pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #7505: Backslash escaping not necessary
2+ messages / 2 participants
[nested] [flat]
* BUG #7505: Backslash escaping not necessary
@ 2012-08-24 19:59 ovadyaj@gmail.com
0 siblings, 1 reply; 2+ messages in thread
From: ovadyaj@gmail.com @ 2012-08-24 19:59 UTC (permalink / raw)
To: pgsql-bugs
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:
INSERT INTO customer VALUES ( 20, 'Mr', 'Jeff', 'Baggott', 'Midtown Street
A\\33', 'Milltown', 'MT9 8NQ', '746 3956'); results in two backslashes
instead of a single one.
Inserting the address with a single backslash succeeds in saving the
backslash with the address.
Also noticed similar issue escaping single quotes: Backslash will not work
to escape, but doubling up the quotes works.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #7505: Backslash escaping not necessary
@ 2012-08-26 07:04 Thomas Kellerer <spam_eater@gmx.net>
parent: ovadyaj@gmail.com
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Kellerer @ 2012-08-26 07:04 UTC (permalink / raw)
To: pgsql-bugs
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-STR...
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2012-08-26 07:04 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-08-24 19:59 BUG #7505: Backslash escaping not necessary ovadyaj@gmail.com
2012-08-26 07:04 ` Thomas Kellerer <spam_eater@gmx.net>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox