Re: Help needed with standard_conforming_strings

"Greg Sabino Mullane" <greg-738XdyZ4GzZWk0Htik3J/[email protected]>
Newsgroups gmane.comp.db.postgresql.dbdpg
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160


> Couldn't DBD::Pg just switch to using ' to escape quotes? I mean, the
> problem is DBD::Pg escaping in $dbh->quote(), is it not? In that case,
> Just escape ' and not \ if SCS is on.

No, we can't leave backslashes unescaped: that's a compatiblity can of
worms I don't want to open. Consider the result of a $dbh->quote() that's
stored by the app and then reused - but with a different SCS setting!

In reviewing this, I think I've overcomplicated matters. We don't need to
consider the status of standard_conforming_strings at all, we simply
need to always use E'' if 1) the string contain a backslash and
2) the server can handle the E syntax.

- --
Greg Sabino Mullane greg-738XdyZ4GzZWk0Htik3J/[email protected]
End Point Corporation
PGP Key: 0x14964AC8 200805081921
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----

iEYEAREDAAYFAkgjiygACgkQvJuQZxSWSsi62ACfUaAwHGzqhIVu7WKtv3+59U8E
MzoAoJGR0pRAbp3QV/vwhyO68sQnU7DK
=tmRv
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.