Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id 7E2572E0076 for ; Wed, 30 Apr 2008 15:26:17 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 45313-09 for ; Wed, 30 Apr 2008 15:26:12 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from QMTA01.westchester.pa.mail.comcast.net (qmta01.westchester.pa.mail.comcast.net [76.96.62.16]) by developer.postgresql.org (Postfix) with ESMTP id A9E9F2E004D for ; Wed, 30 Apr 2008 15:26:12 -0300 (ADT) Received: from OMTA12.westchester.pa.mail.comcast.net ([76.96.62.44]) by QMTA01.westchester.pa.mail.comcast.net with comcast id Ks5Z1Z0060xGWP8510Ht00; Wed, 30 Apr 2008 18:26:11 +0000 Received: from dhcp-142.subnet-212.amherst.edu ([148.85.212.142]) by OMTA12.westchester.pa.mail.comcast.net with comcast id KuS01Z00K34ttPY3Y00000; Wed, 30 Apr 2008 18:26:09 +0000 X-Authority-Analysis: v=1.0 c=1 a=Mi2QT9DIqbAns3PF98AA:9 a=TH_VO5lvYD1DM-BRCkAA:7 a=8Wcy1MUGFyTMCj_Cywwf9RtFGUsA:4 a=LY0hPdMaydYA:10 Message-Id: <0108EC19-3397-4D79-8F05-F1AA1BDAE48B@amherst.edu> From: Andy Anderson To: pgsql-docs@postgresql.org In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Subject: Backslash Escape Sequences Date: Wed, 30 Apr 2008 14:26:00 -0400 References: <18414.1209565708@sss.pgh.pa.us> X-Mailer: Apple Mail (2.919.2) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200804/25 X-Sequence-Number: 4885 On the list pgsql-general, I had this exchange: >>> Andy Anderson writes: >>>> In a test I just did, the sequence \" (backslash double-quote) is >>>> interpreted as just a " inside of the E'...' string constant >>>> expression. This is great, since PHP's addslashes() sticks them >>>> in along with the other stuff I really need to quote like ' and >>>> \. But I see that \" isn't documented in the manual in section >>>> 4.1.2.1. I assume this is, in fact, standard behavior for >>>> Postgres? (Perhaps a comprehensive table might be a good idea at >>>> this point in the manual.) >> >> Tom Lane wrote: >>> Huh? It says >>> >>> Any other character following a backslash is taken literally. >>> >>> > > Andy Anderson wrote: >> Ah, slight ambiguity here. Perhaps this might best say "Any other >> character following a backslash is taken literally, and the >> backslash is removed." 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! -- Andy