Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id DADC5650EF8 for ; Thu, 26 Jun 2008 19:25:31 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 56572-07 for ; Thu, 26 Jun 2008 19:25:20 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from momjian.us (momjian.us [70.90.9.53]) by postgresql.org (Postfix) with ESMTP id 34C00650EA6 for ; Thu, 26 Jun 2008 19:25:24 -0300 (ADT) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id m5QMPOR02121; Thu, 26 Jun 2008 18:25:24 -0400 (EDT) From: Bruce Momjian Message-Id: <200806262225.m5QMPOR02121@momjian.us> Subject: Re: Backslash Escape Sequences In-Reply-To: <3E797734-2E62-4E9D-955E-94D63EA114B7@amherst.edu> To: Andy Anderson Date: Thu, 26 Jun 2008 18:25:24 -0400 (EDT) CC: pgsql-docs@postgresql.org X-Mailer: ELM [version 2.4ME+ PL124 (25)] MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="ELM1214519124-9733-0_" Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200806/14 X-Sequence-Number: 4931 --ELM1214519124-9733-0_ Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" Andy Anderson wrote: > >> Andy Anderson wrote: > >> > >>> In any case, here's a contribution to the manual, a short table with > >>> this information, in a format that might help make the subject > >>> clearer. > >> Modify at will! > > > On Apr 30, 2008, at 6:04 PM, Alvaro Herrera wrote: > >> FWIW if you really want to make a contribution to the docs, please > >> see > >> the SGML sources instead of the HTML output (which is machine- > >> generated). > > OK, then, I hope the following is accurate enough SGML to be more > useful. Submitted here per the instructions on http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. + --ELM1214519124-9733-0_ Content-Transfer-Encoding: 7bit Content-Type: text/x-diff Content-Disposition: inline; filename="/rtmp/diff" Index: doc/src/sgml/syntax.sgml =================================================================== RCS file: /cvsroot/pgsql/doc/src/sgml/syntax.sgml,v retrieving revision 1.122 diff -c -c -r1.122 syntax.sgml *** doc/src/sgml/syntax.sgml 20 Mar 2008 21:42:47 -0000 1.122 --- doc/src/sgml/syntax.sgml 26 Jun 2008 22:24:11 -0000 *************** *** 286,304 **** quote.) Within an escape string, a backslash character (\) begins a C-like backslash escape sequence, in which the combination ! of backslash and following character(s) represents a special byte value. ! \b is a backspace, ! \f is a form feed, ! \n is a newline, ! \r is a carriage return, ! \t is a tab. ! Also supported are ! \digits, where ! digits 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 character, write two backslashes (\\). Also, a single quote can be included in an escape string by writing --- 286,348 ---- quote.) Within an escape string, a backslash character (\) begins a C-like backslash escape sequence, in which the combination ! of backslash and following character(s) represent a special byte ! value: ! ! ! Backslash Escape Sequences ! ! ! ! Backslash Escape Sequence ! Interpretation ! ! ! ! ! ! \b ! backspace ! ! ! \f ! form feed ! ! ! \n ! newline ! ! ! \r ! carriage return ! ! ! \t ! tab ! ! ! ! \o, ! \oo, ! \ooo ! (o = 0 - 7) ! ! octal byte value ! ! ! ! \xh, ! \xhh ! (h = 0 - 9, A - F) ! ! 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 character, write two backslashes (\\). Also, a single quote can be included in an escape string by writing --ELM1214519124-9733-0_--