|
10 | 10 | * Written by Peter Eisentraut <peter_e@gmx.net>.
|
11 | 11 | *
|
12 | 12 | * IDENTIFICATION
|
13 |
| - * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.443 2008/04/03 13:25:02 mha Exp $ |
| 13 | + * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.444 2008/04/04 08:33:15 mha Exp $ |
14 | 14 | *
|
15 | 15 | *--------------------------------------------------------------------
|
16 | 16 | */
|
@@ -155,8 +155,6 @@ static bool assign_transaction_read_only(bool newval, bool doit, GucSource sourc
|
155 | 155 | staticconstchar*assign_canonical_path(constchar*newval,booldoit,GucSourcesource);
|
156 | 156 | staticconstchar*assign_backslash_quote(constchar*newval,booldoit,GucSourcesource);
|
157 | 157 | staticconstchar*assign_timezone_abbreviations(constchar*newval,booldoit,GucSourcesource);
|
158 |
| -staticconstchar*assign_xmlbinary(constchar*newval,booldoit,GucSourcesource); |
159 |
| -staticconstchar*assign_xmloption(constchar*newval,booldoit,GucSourcesource); |
160 | 158 | staticconstchar*show_archive_command(void);
|
161 | 159 | staticboolassign_tcp_keepalives_idle(intnewval,booldoit,GucSourcesource);
|
162 | 160 | staticboolassign_tcp_keepalives_interval(intnewval,booldoit,GucSourcesource);
|
@@ -243,6 +241,17 @@ static const struct config_enum_entry syslog_facility_options[] = {
|
243 | 241 | };
|
244 | 242 | #endif
|
245 | 243 |
|
| 244 | +staticconststructconfig_enum_entryxmlbinary_options[]= { |
| 245 | +{"base64",XMLBINARY_BASE64}, |
| 246 | +{"hex",XMLBINARY_HEX}, |
| 247 | +{NULL,0} |
| 248 | +}; |
| 249 | + |
| 250 | +staticconststructconfig_enum_entryxmloption_options[]= { |
| 251 | +{"content",XMLOPTION_CONTENT}, |
| 252 | +{"document",XMLOPTION_DOCUMENT}, |
| 253 | +{NULL,0} |
| 254 | +}; |
246 | 255 |
|
247 | 256 | /*
|
248 | 257 | * GUC option variables that are exported from this module
|
@@ -316,8 +325,6 @@ static char *timezone_abbreviations_string;
|
316 | 325 | staticchar*XactIsoLevel_string;
|
317 | 326 | staticchar*data_directory;
|
318 | 327 | staticchar*custom_variable_classes;
|
319 |
| -staticchar*xmlbinary_string; |
320 |
| -staticchar*xmloption_string; |
321 | 328 | staticintmax_function_args;
|
322 | 329 | staticintmax_index_keys;
|
323 | 330 | staticintmax_identifier_length;
|
@@ -2382,25 +2389,6 @@ static struct config_string ConfigureNamesString[] =
|
2382 | 2389 | NULL,assign_canonical_path,NULL
|
2383 | 2390 | },
|
2384 | 2391 |
|
2385 |
| -{ |
2386 |
| -{"xmlbinary",PGC_USERSET,CLIENT_CONN_STATEMENT, |
2387 |
| -gettext_noop("Sets how binary values are to be encoded in XML."), |
2388 |
| -gettext_noop("Valid values are BASE64 and HEX.") |
2389 |
| -}, |
2390 |
| -&xmlbinary_string, |
2391 |
| -"base64",assign_xmlbinary,NULL |
2392 |
| -}, |
2393 |
| - |
2394 |
| -{ |
2395 |
| -{"xmloption",PGC_USERSET,CLIENT_CONN_STATEMENT, |
2396 |
| -gettext_noop("Sets whether XML data in implicit parsing and serialization " |
2397 |
| -"operations is to be considered as documents or content fragments."), |
2398 |
| -gettext_noop("Valid values are DOCUMENT and CONTENT.") |
2399 |
| -}, |
2400 |
| -&xmloption_string, |
2401 |
| -"content",assign_xmloption,NULL |
2402 |
| -}, |
2403 |
| - |
2404 | 2392 | {
|
2405 | 2393 | {"default_text_search_config",PGC_USERSET,CLIENT_CONN_LOCALE,
|
2406 | 2394 | gettext_noop("Sets default text search configuration."),
|
@@ -2524,6 +2512,25 @@ static struct config_enum ConfigureNamesEnum[] =
|
2524 | 2512 | assign_session_replication_role,NULL
|
2525 | 2513 | },
|
2526 | 2514 |
|
| 2515 | +{ |
| 2516 | +{"xmlbinary",PGC_USERSET,CLIENT_CONN_STATEMENT, |
| 2517 | +gettext_noop("Sets how binary values are to be encoded in XML."), |
| 2518 | +gettext_noop("Valid values are BASE64 and HEX.") |
| 2519 | +}, |
| 2520 | +&xmlbinary, |
| 2521 | +XMLBINARY_BASE64,xmlbinary_options,NULL,NULL |
| 2522 | +}, |
| 2523 | + |
| 2524 | +{ |
| 2525 | +{"xmloption",PGC_USERSET,CLIENT_CONN_STATEMENT, |
| 2526 | +gettext_noop("Sets whether XML data in implicit parsing and serialization " |
| 2527 | +"operations is to be considered as documents or content fragments."), |
| 2528 | +gettext_noop("Valid values are DOCUMENT and CONTENT.") |
| 2529 | +}, |
| 2530 | +&xmloption, |
| 2531 | +XMLOPTION_CONTENT,xmloption_options,NULL,NULL |
| 2532 | +}, |
| 2533 | + |
2527 | 2534 |
|
2528 | 2535 | /* End-of-list marker */
|
2529 | 2536 | {
|
@@ -7172,42 +7179,6 @@ pg_timezone_abbrev_initialize(void)
|
7172 | 7179 | }
|
7173 | 7180 | }
|
7174 | 7181 |
|
7175 |
| -staticconstchar* |
7176 |
| -assign_xmlbinary(constchar*newval,booldoit,GucSourcesource) |
7177 |
| -{ |
7178 |
| -XmlBinaryTypexb; |
7179 |
| - |
7180 |
| -if (pg_strcasecmp(newval,"base64")==0) |
7181 |
| -xb=XMLBINARY_BASE64; |
7182 |
| -elseif (pg_strcasecmp(newval,"hex")==0) |
7183 |
| -xb=XMLBINARY_HEX; |
7184 |
| -else |
7185 |
| -returnNULL;/* reject */ |
7186 |
| - |
7187 |
| -if (doit) |
7188 |
| -xmlbinary=xb; |
7189 |
| - |
7190 |
| -returnnewval; |
7191 |
| -} |
7192 |
| - |
7193 |
| -staticconstchar* |
7194 |
| -assign_xmloption(constchar*newval,booldoit,GucSourcesource) |
7195 |
| -{ |
7196 |
| -XmlOptionTypexo; |
7197 |
| - |
7198 |
| -if (pg_strcasecmp(newval,"document")==0) |
7199 |
| -xo=XMLOPTION_DOCUMENT; |
7200 |
| -elseif (pg_strcasecmp(newval,"content")==0) |
7201 |
| -xo=XMLOPTION_CONTENT; |
7202 |
| -else |
7203 |
| -returnNULL;/* reject */ |
7204 |
| - |
7205 |
| -if (doit) |
7206 |
| -xmloption=xo; |
7207 |
| - |
7208 |
| -returnnewval; |
7209 |
| -} |
7210 |
| - |
7211 | 7182 | staticconstchar*
|
7212 | 7183 | show_archive_command(void)
|
7213 | 7184 | {
|
|