diff --git a/src/backend/parser/scan.l b/src/backend/parser/scan.l index d83fed1a540ef3edef58b535e94dc52370854d0f..ef504750482d4484987c85a32c242be3baa9df6e 100755 --- a/src/backend/parser/scan.l +++ b/src/backend/parser/scan.l @@ -24,7 +24,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/parser/scan.l,v 1.153 2009/05/05 21:09:23 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/parser/scan.l,v 1.168 2010/07/20 00:34:44 rhaas Exp $ * *------------------------------------------------------------------------- */ @@ -76,7 +76,7 @@ static uint32 utf16_top_part; */ int backslash_quote = BACKSLASH_QUOTE_SAFE_ENCODING; bool escape_string_warning = true; -bool standard_conforming_strings = false; +bool standard_conforming_strings = true; static bool warn_on_first_escape; static bool saw_non_ascii = false; diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index 14f7de8aea2a7c34aeafd8fdaaff3f9fd70f5400..96399c180dda972a9ecc43acec793767bba0ec2c 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -11,7 +11,7 @@ * Written by Peter Eisentraut . * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.385 2007/04/16 18:29:55 alvherre Exp $ + * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.563 2010/07/20 00:34:44 rhaas Exp $ * *-------------------------------------------------------------------- */ @@ -1053,7 +1053,7 @@ static struct config_bool ConfigureNamesBool[] = GUC_REPORT }, &standard_conforming_strings, - false, NULL, NULL + true, NULL, NULL }, { diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample index eb04f46688e5bed23e37de094e7e19103a105540..198eab57c10ffe25a21da0265acefa7d1bd95610 100755 --- a/src/backend/utils/misc/postgresql.conf.sample +++ b/src/backend/utils/misc/postgresql.conf.sample @@ -495,7 +495,7 @@ max_appendonly_tables = 10000 # Maximum number of append only tables that can #backslash_quote = safe_encoding # on, off, or safe_encoding #escape_string_warning = on #regex_flavor = advanced # advanced, extended, or basic -#standard_conforming_strings = off +#standard_conforming_strings = on # - Other Platforms and Clients - diff --git a/src/test/regress/bugbuster/expected/xpath.out b/src/test/regress/bugbuster/expected/xpath.out index 7dc7fbd9fe3f6c1f4a90c3629ec71777b44b87d0..dbc830560bb6f9916bc63ff58acbc7ee492818f2 100644 --- a/src/test/regress/bugbuster/expected/xpath.out +++ b/src/test/regress/bugbuster/expected/xpath.out @@ -284,11 +284,7 @@ DETAIL: Entity: line 1: parser error : Premature end of data in tag a line 1 Entity: line 1: parser error : Premature end of data in tag a line 1 hello ^ -select xmlcomment('hello<\a>'); -WARNING: nonstandard use of escape in a string literal -LINE 1: select xmlcomment('hello<\a>'); - ^ -HINT: Use the escape string syntax for escapes, e.g., E'\r\n'. +select xmlcomment(E'hello<\a>'); xmlcomment -------------------- @@ -300,11 +296,7 @@ select xmlcomment('adsfasdfasdfsadf'); (1 row) -select xmlcomment('\n'); -WARNING: nonstandard use of escape in a string literal -LINE 1: select xmlcomment('\n'); - ^ -HINT: Use the escape string syntax for escapes, e.g., E'\r\n'. +select xmlcomment(E'\n'); xmlcomment ------------