From 637028afe17b9616d279d13d9fc5d6df1ecf369b Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 11 May 2006 19:15:36 +0000 Subject: Code review for standard_conforming_strings patch. Fix it so it does not throw warnings for 100%-SQL-standard constructs, clean up some minor infelicities, try to un-break ecpg to the best of my ability. (It's not clear how ecpg is going to find out the setting of standard_conforming_strings, though.) I think pg_dump still needs work, too. --- doc/src/sgml/config.sgml | 59 ++++++++++++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 25 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 933ca3811dc..a2e6d46ca6a 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -1,4 +1,4 @@ - + Server Configuration @@ -3734,32 +3734,15 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' When on, a warning is issued if a backslash (\) appears in an ordinary string literal ('...' - syntax). The default is on. + syntax) and standard_conforming_strings is off. + The default is on. - Escape string syntax (E'...') should be used for - backslash escape sequences, because ordinary strings have - the standard-conforming behavior of treating backslashes - literally when the standard-conforming-strings - option is set on. - - - - - - standard_conforming_strings (boolean) - stringsstandard conforming - - standard_conforming_strings configuration parameter - - - - Controls whether ordinary string literals - ('...') treat backslashes literally, as specified in - the SQL standard. Applications may check this - parameter to determine how string literals will be processed. - The presence of this parameter can also be taken as an indication - that the escape string syntax (E'...') is supported. + Applications that wish to use backslash as escape should be + modified to use escape string syntax (E'...'), + because the default behavior of ordinary strings will change + in a future release for SQL compatibility. This variable can + be enabled to help detect applications that will break. @@ -3799,6 +3782,32 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' + + standard_conforming_strings (boolean) + stringsstandard conforming + + standard_conforming_strings configuration parameter + + + + This controls whether ordinary string literals + ('...') treat backslashes literally, as specified in + the SQL standard. + The default is currently off, causing + PostgreSQL to have its historical + behavior of treating backslashes as escape characters. + The default will change to on in a future release + to improve compatibility with the standard. + Applications may check this + parameter to determine how string literals will be processed. + The presence of this parameter can also be taken as an indication + that the escape string syntax (E'...') is supported. + Escape string syntax should be used if an application desires + backslashes to be treated as escape characters. + + + + -- cgit v1.2.3