|
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.444 2008/04/0408:33:15 mha Exp $ |
| 13 | + * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.445 2008/04/0411:47:19 mha Exp $ |
14 | 14 | *
|
15 | 15 | *--------------------------------------------------------------------
|
16 | 16 | */
|
@@ -153,7 +153,6 @@ static bool assign_stage_log_stats(bool newval, bool doit, GucSource source);
|
153 | 153 | staticboolassign_log_stats(boolnewval,booldoit,GucSourcesource);
|
154 | 154 | staticboolassign_transaction_read_only(boolnewval,booldoit,GucSourcesource);
|
155 | 155 | staticconstchar*assign_canonical_path(constchar*newval,booldoit,GucSourcesource);
|
156 |
| -staticconstchar*assign_backslash_quote(constchar*newval,booldoit,GucSourcesource); |
157 | 156 | staticconstchar*assign_timezone_abbreviations(constchar*newval,booldoit,GucSourcesource);
|
158 | 157 | staticconstchar*show_archive_command(void);
|
159 | 158 | staticboolassign_tcp_keepalives_idle(intnewval,booldoit,GucSourcesource);
|
@@ -253,6 +252,23 @@ static const struct config_enum_entry xmloption_options[] = {
|
253 | 252 | {NULL,0}
|
254 | 253 | };
|
255 | 254 |
|
| 255 | +/* |
| 256 | + * Although only "on", "off", and "safe_encoding" are documented, we |
| 257 | + * accept all the likely variants of "on" and "off". |
| 258 | + */ |
| 259 | +staticconststructconfig_enum_entrybackslash_quote_options[]= { |
| 260 | +{"safe_encoding",BACKSLASH_QUOTE_SAFE_ENCODING}, |
| 261 | +{"on",BACKSLASH_QUOTE_ON}, |
| 262 | +{"off",BACKSLASH_QUOTE_OFF}, |
| 263 | +{"true",BACKSLASH_QUOTE_ON}, |
| 264 | +{"false",BACKSLASH_QUOTE_OFF}, |
| 265 | +{"yes",BACKSLASH_QUOTE_ON}, |
| 266 | +{"no",BACKSLASH_QUOTE_OFF}, |
| 267 | +{"1",BACKSLASH_QUOTE_ON}, |
| 268 | +{"0",BACKSLASH_QUOTE_OFF}, |
| 269 | +{NULL,0} |
| 270 | +}; |
| 271 | + |
256 | 272 | /*
|
257 | 273 | * GUC option variables that are exported from this module
|
258 | 274 | */
|
@@ -311,7 +327,6 @@ static char *syslog_ident_str;
|
311 | 327 | staticboolphony_autocommit;
|
312 | 328 | staticboolsession_auth_is_superuser;
|
313 | 329 | staticdoublephony_random_seed;
|
314 |
| -staticchar*backslash_quote_string; |
315 | 330 | staticchar*client_encoding_string;
|
316 | 331 | staticchar*datestyle_string;
|
317 | 332 | staticchar*locale_collate;
|
@@ -1959,15 +1974,6 @@ static struct config_string ConfigureNamesString[] =
|
1959 | 1974 | "",NULL,show_archive_command
|
1960 | 1975 | },
|
1961 | 1976 |
|
1962 |
| -{ |
1963 |
| -{"backslash_quote",PGC_USERSET,COMPAT_OPTIONS_PREVIOUS, |
1964 |
| -gettext_noop("Sets whether \"\\'\" is allowed in string literals."), |
1965 |
| -gettext_noop("Valid values are ON, OFF, and SAFE_ENCODING.") |
1966 |
| -}, |
1967 |
| -&backslash_quote_string, |
1968 |
| -"safe_encoding",assign_backslash_quote,NULL |
1969 |
| -}, |
1970 |
| - |
1971 | 1977 | {
|
1972 | 1978 | {"client_encoding",PGC_USERSET,CLIENT_CONN_LOCALE,
|
1973 | 1979 | gettext_noop("Sets the client's character set encoding."),
|
@@ -2419,6 +2425,15 @@ static struct config_string ConfigureNamesString[] =
|
2419 | 2425 |
|
2420 | 2426 | staticstructconfig_enumConfigureNamesEnum[]=
|
2421 | 2427 | {
|
| 2428 | +{ |
| 2429 | +{"backslash_quote",PGC_USERSET,COMPAT_OPTIONS_PREVIOUS, |
| 2430 | +gettext_noop("Sets whether \"\\'\" is allowed in string literals."), |
| 2431 | +gettext_noop("Valid values are ON, OFF, and SAFE_ENCODING.") |
| 2432 | +}, |
| 2433 | +&backslash_quote, |
| 2434 | +BACKSLASH_QUOTE_SAFE_ENCODING,backslash_quote_options,NULL,NULL |
| 2435 | +}, |
| 2436 | + |
2422 | 2437 | {
|
2423 | 2438 | {"client_min_messages",PGC_USERSET,LOGGING_WHEN,
|
2424 | 2439 | gettext_noop("Sets the message levels that are sent to the client."),
|
|