diff options
| author | Bruce Momjian <bruce@momjian.us> | 2005-06-26 03:04:37 +0000 |
|---|---|---|
| committer | Bruce Momjian <bruce@momjian.us> | 2005-06-26 03:04:37 +0000 |
| commit | bb3cce4ec9cc157a8dfc80b5b1770c2beac0a57e (patch) | |
| tree | 5631b9dda006f8c56f6b1d4f64c72f015adf2468 /doc/src/sgml/runtime.sgml | |
| parent | c96375a39b28e54e19fa5c9c2e3dd69c44b7618c (diff) | |
| download | postgresql-bb3cce4ec9cc157a8dfc80b5b1770c2beac0a57e.tar.gz | |
Add E'' syntax so eventually normal strings can treat backslashes
literally.
Add GUC variables:
"escape_string_warning" - warn about backslashes in non-E strings
"escape_string_syntax" - supports E'' syntax?
"standard_compliant_strings" - treats backslashes literally in ''
Update code to use E'' when escapes are used.
Diffstat (limited to 'doc/src/sgml/runtime.sgml')
| -rw-r--r-- | doc/src/sgml/runtime.sgml | 57 |
1 files changed, 56 insertions, 1 deletions
diff --git a/doc/src/sgml/runtime.sgml b/doc/src/sgml/runtime.sgml index 4333445392..3841b0dee2 100644 --- a/doc/src/sgml/runtime.sgml +++ b/doc/src/sgml/runtime.sgml @@ -1,5 +1,5 @@ <!-- -$PostgreSQL: pgsql/doc/src/sgml/runtime.sgml,v 1.330 2005/06/21 04:02:30 tgl Exp $ +$PostgreSQL: pgsql/doc/src/sgml/runtime.sgml,v 1.331 2005/06/26 03:03:17 momjian Exp $ --> <chapter Id="runtime"> @@ -3757,6 +3757,30 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' </listitem> </varlistentry> + <varlistentry id="guc-escape-string-warning" xreflabel="escape_string_warning"> + <term><varname>escape_string_warning</varname> (<type>boolean</type>)</term> + <indexterm><primary>strings</><secondary>escape</></> + <indexterm> + <primary><varname>escape_string_warning</> configuration parameter</primary> + </indexterm> + <listitem> + <para> + When <literal>on</>, a warning is issued if a backslash + (<literal>\</>) appears in a ordinary, non-escape syntax + (<literal>''</>) string. To log the statement that generated the + warning, set <varname>log_min_error_statement</> to + <literal>error</>. The default is off. + </para> + <para> + Escape string syntax (<literal>E''</>) should be used for + escapes, because in future versions of + <productname>PostgreSQL</productname> ordinary strings will have + the standard-compliant behavior of treating backslashes + literally. + </para> + </listitem> + </varlistentry> + </variablelist> </sect3> <sect3 id="runtime-config-compatible-clients"> @@ -3964,6 +3988,37 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' </listitem> </varlistentry> + <varlistentry id="guc-escape-string-syntax" xreflabel="escape_string_syntax"> + <term><varname>escape_string_syntax</varname> (<type>boolean</type>)</term> + <indexterm><primary>strings</><secondary>escape</></> + <indexterm> + <primary><varname>escape_string_syntax</> configuration parameter</primary> + </indexterm> + <listitem> + <para> + Reports whether escape string syntax (<literal>E''</>) is + supported. This variable is used by applications that need to + determine if escape string syntax can be used in their code. + </para> + </listitem> + </varlistentry> + + <varlistentry id="guc-sql-standard-strings" xreflabel="standard_compliant_strings"> + <term><varname>standard_compliant_strings</varname> (<type>boolean</type>)</term> + <indexterm><primary>strings</><secondary>escape</></> + <indexterm> + <primary><varname>standard_compliant_strings</> configuration parameter</primary> + </indexterm> + <listitem> + <para> + Reports whether ordinary, non-escape syntax strings + (<literal>''</>) treat backslashes literally, as specified in + the SQL standard. This variable is used by applications that + need to know how ordinary strings are processed`. + </para> + </listitem> + </varlistentry> + </variablelist> </sect2> |
