diff options
author | Bruce Momjian <bruce@momjian.us> | 2005-06-02 01:23:08 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2005-06-02 01:23:08 +0000 |
commit | 65537ac1b41f18e029b8172b8308189434c310d6 (patch) | |
tree | 31d4cc943af05b46d29363cd9f82b908e461d820 /doc/src | |
parent | 202e6e73e6947b9c8baf9c8758618c1d8a5dcd73 (diff) |
Add support for \x hex escapes in backend strings. Octal was already
supported. This follows the C standard escapes.
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/syntax.sgml | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/doc/src/sgml/syntax.sgml b/doc/src/sgml/syntax.sgml index 6e49e9cee1e..45b6a80564b 100644 --- a/doc/src/sgml/syntax.sgml +++ b/doc/src/sgml/syntax.sgml @@ -1,5 +1,5 @@ <!-- -$PostgreSQL: pgsql/doc/src/sgml/syntax.sgml,v 1.99 2004/12/23 05:37:40 tgl Exp $ +$PostgreSQL: pgsql/doc/src/sgml/syntax.sgml,v 1.100 2005/06/02 01:23:08 momjian Exp $ --> <chapter id="sql-syntax"> @@ -254,17 +254,18 @@ UPDATE "my_table" SET "a" = 5; <para> Another <productname>PostgreSQL</productname> extension is that - C-style backslash escapes are available: - <literal>\b</literal> is a backspace, <literal>\f</literal> is a - form feed, <literal>\n</literal> is a newline, - <literal>\r</literal> is a carriage return, <literal>\t</literal> - is a tab, and <literal>\<replaceable>xxx</replaceable></literal>, - where <replaceable>xxx</replaceable> is an octal number, is a - byte with the corresponding code. (It is your responsibility - that the byte sequences you create are valid characters in the - server character set encoding.) Any other character following a - backslash is taken literally. Thus, to include a backslash in a - string constant, write two backslashes. + C-style backslash escapes are available: <literal>\b</literal> is a + backspace, <literal>\f</literal> is a form feed, + <literal>\n</literal> is a newline, <literal>\r</literal> is a + carriage return, <literal>\t</literal> is a tab. Also supported is + <literal>\<replaceable>digits</replaceable></literal>, where + <replaceable>ddd</replaceable> represents an octal byte value, and + <literal>\x<replaceable>hexdigits</replaceable></literal>, where + <replaceable>hexdigits</replaceable> represents a hexadecimal byte value. + (It is your responsibility that the byte sequences you create are + valid characters in the server character set encoding.) Any other + character following a backslash is taken literally. Thus, to + include a backslash in a string constant, write two backslashes. </para> <para> |