From 65537ac1b41f18e029b8172b8308189434c310d6 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Thu, 2 Jun 2005 01:23:08 +0000 Subject: Add support for \x hex escapes in backend strings. Octal was already supported. This follows the C standard escapes. --- doc/src/sgml/syntax.sgml | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'doc/src') 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 @@ @@ -254,17 +254,18 @@ UPDATE "my_table" SET "a" = 5; Another PostgreSQL extension is that - C-style backslash escapes are available: - \b is a backspace, \f is a - form feed, \n is a newline, - \r is a carriage return, \t - is a tab, and \xxx, - where xxx 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: \b is a + backspace, \f is a form feed, + \n is a newline, \r is a + carriage return, \t is a tab. Also supported is + \digits, where + ddd represents an octal byte value, and + \xhexdigits, where + hexdigits 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. -- cgit v1.2.3