Philip M. Gollucci bcc0626319 PostgreSQL 8.3.1 has changed it's bytea encoding.
* in PostgreSQL 8.3.1 Release note
Make encode(bytea, 'escape') convert all high-bit-set byte values into \nnn octal escape sequences (Tom)

This is necessary to avoid encoding problems when the database encoding is multi-byte. This change could pose compatibility issues for applications that are expecting specific results from encode.

but pyPgSQL escape bytea encode as it's own implementments. PostgreSQL says that it may make failure(see PQescapeBytea documentation).

in PQescapeBytea function documentation:
"The only difference from PQescapeByteaConn is that PQescapeBytea does not take a PGconn parameter. Because of this, it cannot adjust its behavior depending on the connection properties (in particular, whether standard-conforming strings are enabled) and therefore it might give the wrong results. Also, it has no way to return an error message on failure."

Patch is included upstream already

PR:             ports/122616
Submitted by:   "Choe, Cheng-Dae" <whitekid@gmail.com>
2010-09-10 04:18:06 +00:00

7 lines
399 B
Plaintext

MD5 (pyPgSQL-2.5.1.tar.gz) = 82670f6f1652aa4766fdaec2cb43debd
SHA256 (pyPgSQL-2.5.1.tar.gz) = 498486f066f11a68f5b02a54ba5a008d01d507038c873bfd901c14d3f5ca18af
SIZE (pyPgSQL-2.5.1.tar.gz) = 152840
MD5 (pyPgSQL-patch_byteaconn) = 97744f64d06efcba79aa13f4dee9c076
SHA256 (pyPgSQL-patch_byteaconn) = 73a324808aef49382e736245023eb8c468e1ca0803052a2a45162465b0ad28d7
SIZE (pyPgSQL-patch_byteaconn) = 4718