Re: BUG #7505: Backslash escaping not necessary

From: Thomas Kellerer <spam_eater(at)gmx(dot)net>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #7505: Backslash escaping not necessary
Date: 2012-08-26 07:04:45
Message-ID: k1chqc$2cp$1@ger.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

ovadyaj(at)gmail(dot)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(at)gmail(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2012-08-27 02:19:40 Re: BUG #6372: Error while creating database with fsync parameter as on incase of CIFS
Previous Message Guillaume Lelarge 2012-08-26 06:32:57 Re: BUG #7506: Windows 64 bit PGAdmin 1.14.3 plpgsql default parameter value not appearing