Re: PgSQL query warning
"Thomas Preud'homme" <[email protected]> Wed, 12 Jun 2013 14:18:16 +0200
| Newsgroups | gmane.mail.spam.dspam.devel |
|---|---|
| Message-ID | <[email protected]> |
--===============0718300936344669687== Content-Type: multipart/signed; boundary="nextPart5859660.NMhdG7pO66"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart5859660.NMhdG7pO66 Content-Type: multipart/mixed; boundary="Boundary-01=_IcGuRITrqMQl0fL" Content-Transfer-Encoding: 7bit --Boundary-01=_IcGuRITrqMQl0fL Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Le mercredi 12 juin 2013 14:10:25, Chris Moules a =E9crit : > Hello Tom, >=20 > System is a Debian 7 test system > dspam: 3.10.2 - backport from testing > postgresql: 9.1 >=20 > The line that I patched is still in git HEAD as-is. I can look at > re-building my full-debug version and posting full output. Strange, there is normally a patch (see attached file) to handle this in=20 Debian. >=20 > Regards, >=20 > Chris Best regards, Thomas of the Debian Dspam team --Boundary-01=_IcGuRITrqMQl0fL Content-Type: text/x-patch; charset="UTF-8"; name="010_set_legacy_escape_strings.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="010_set_legacy_escape_strings.diff" Require legacy mode for string escaping in pgsql Explicitly require legacy mode for string escaping in PostgreSQL since it now defaults to standard compliant mode. Author: Julien Cristau <[email protected]> Origin: vendor, http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=3D694942 Bug-Debian: http://bugs.debian.org/694942 =46orwarded: no Last-Update: 2013-05-29 diff --git a/src/pgsql_drv.c b/src/pgsql_drv.c index eac2354..b110a3f 100644 =2D-- a/src/pgsql_drv.c +++ b/src/pgsql_drv.c @@ -3175,6 +3175,12 @@ PGconn *_pgsql_drv_connect(DSPAM_CTX *CTX) return NULL; } =20 + if (PQserverVersion(dbh) >=3D 90100) + { + PGresult *result =3D PQexec(dbh, "SET standard_conforming_strings TO o= ff;"); + if (result) + PQclear(result); + } return dbh; =20 FAILURE: --Boundary-01=_IcGuRITrqMQl0fL-- --nextPart5859660.NMhdG7pO66 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (GNU/Linux) iQIcBAABAgAGBQJRuGcIAAoJENADhS+9UlKe9mcP/0ZMvFQwCwdiZQEVrHx7fSHa jA5tGJz7Vrgb2iRRnnAOz3PvcES9GTkSoizRS49+80IpY6pmx5t/Qi+W+aHmv1CB oNH5s7+Di2TEQp0UIHF+k9IPH4WPITy+48D/cT57Q6leaaQTCpjRjvRm9d59H3cz SbLv835YlLgfIgw8ZZQLXjO6/kv03pQE+zJqhAah+In/uQe4wiiJiCC0wGMZOgm9 KbtGNysNaQzYg83dqjbc3KgIxqtIf5hIxOydGZZHK9vB0+NaNE8JgpOm2hXl6W0X IzIL1XKEgDOtzewTL2jINxN4FoRZY1FI5MNhgKFlPHx+xskSp+OmC7uXEgAWnRmL +VLVkcm93uZ34+RxTQKsGziqhkIiZWgRlOEjxDcOc3gUTnHzffUSeHRQI+ht5yEP 1M3V1q7XdHj50Rj1D5AnT+tL3r46qtllb6mNgoRWlbxubZTqNRSt4TMQyvc5tK5E UFxf4cxee/z2ZUZlRB7RWJv/7OxkuZw8gcRXcxsMWacPZjPwlbmBid2YIJDHMCq8 Mw3pEvmVHekqRr18Uj3ifCi6hrEDeUsIdRENWS2lNl5CzZ4JAsn28g2ER1HCBMci OrYxKZgX8TDSC4KiAEb3MDOuvSpHZWOKOMk0J2h6D+q/o0MmT9R4bOcOmOOU2pcw eOzdKPM0oA4qL0eaBWPX =WN/t -----END PGP SIGNATURE----- --nextPart5859660.NMhdG7pO66-- --===============0718300936344669687== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev --===============0718300936344669687== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Dspam-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dspam-devel --===============0718300936344669687==--