Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T5Wu6-0000q5-Ev for pgsql-bugs@postgresql.org; Sun, 26 Aug 2012 07:05:02 +0000 Received: from plane.gmane.org ([80.91.229.3]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T5Wu1-0001tD-UF for pgsql-bugs@postgresql.org; Sun, 26 Aug 2012 07:05:02 +0000 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1T5Wty-0000KN-Mp for pgsql-bugs@postgresql.org; Sun, 26 Aug 2012 09:04:54 +0200 Received: from host-188-174-173-247.customer.m-online.net ([188.174.173.247]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 26 Aug 2012 09:04:54 +0200 Received: from spam_eater by host-188-174-173-247.customer.m-online.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 26 Aug 2012 09:04:54 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-bugs@postgresql.org From: Thomas Kellerer Subject: Re: BUG #7505: Backslash escaping not necessary Date: Sun, 26 Aug 2012 09:04:45 +0200 Lines: 22 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: host-188-174-173-247.customer.m-online.net User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.21) Gecko/20090302 Thunderbird/2.0.0.21 Mnenhy/0.7.5.666 In-Reply-To: X-Pg-Spam-Score: -1.1 (-) X-Archive-Number: 201208/195 X-Sequence-Number: 33919 ovadyaj@gmail.com wrote on 24.08.2012 21:59: > The following bug has been logged on the website: > > Bug reference: 7505 > Logged by: Jeff Ovadya > Email address: ovadyaj@gmail.com > PostgreSQL version: 9.1.4 > Operating system: PostgreSQL 9.1.4, compiled by Visual C++ build 150 > Description: > > Also noticed similar issue escaping single quotes: Backslash will not work > to escape, but doubling up the quotes works. Which is the correct behaviour and conforms to the SQL standard (and nearly all other DBMS behave the same way) But if you want to use the backslash to escape single quotes check out the parameter "standard_conforming_strings" which controls this behaviour: http://www.postgresql.org/docs/9.1/static/runtime-config-compatible.html#GUC-STANDARD-CONFORMING-STRINGS