diff options
Diffstat (limited to 'src/include/c.h')
-rw-r--r-- | src/include/c.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/include/c.h b/src/include/c.h index 284367547ed..679981ea6cd 100644 --- a/src/include/c.h +++ b/src/include/c.h @@ -12,7 +12,7 @@ * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/c.h,v 1.201 2006/05/26 23:48:54 momjian Exp $ + * $PostgreSQL: pgsql/src/include/c.h,v 1.202 2006/05/28 21:13:54 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -473,12 +473,13 @@ typedef NameData *Name; #define NameStr(name) ((name).data) /* - * In 8.2, we are warning for \ in a non-E string if std_strings are off. - * For this reason, we use E for \ strings, unless standard_conforming_strings - * is on. + * Support macros for escaping strings. escape_backslash should be TRUE + * if generating a non-standard-conforming string. Prefixing a string + * with ESCAPE_STRING_SYNTAX guarantees it is non-standard-conforming. + * Beware of multiple evaluation of the "ch" argument! */ #define SQL_STR_DOUBLE(ch, escape_backslash) \ - ((ch) == '\'' || ((escape_backslash) && (ch) == '\\')) + ((ch) == '\'' || ((ch) == '\\' && (escape_backslash))) #define ESCAPE_STRING_SYNTAX 'E' |