aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip M. Gollucci <pgollucci@FreeBSD.org>2010-09-10 04:18:06 +0000
committerPhilip M. Gollucci <pgollucci@FreeBSD.org>2010-09-10 04:18:06 +0000
commitbcc0626319a5640bd1243612287ac28ed2fa06e1 (patch)
treeb499101e6731227026ff6b821a316e75fadb2336
parenta1039782953241fd17a3e0113b05f2886c125e13 (diff)
downloadports-bcc0626319a5640bd1243612287ac28ed2fa06e1.tar.gz
ports-bcc0626319a5640bd1243612287ac28ed2fa06e1.zip
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>
Notes
Notes: svn path=/head/; revision=260915
-rw-r--r--databases/py-pyPgSQL/Makefile12
-rw-r--r--databases/py-pyPgSQL/distinfo3
2 files changed, 14 insertions, 1 deletions
diff --git a/databases/py-pyPgSQL/Makefile b/databases/py-pyPgSQL/Makefile
index dc7895604a77..3c52ebd6178a 100644
--- a/databases/py-pyPgSQL/Makefile
+++ b/databases/py-pyPgSQL/Makefile
@@ -7,7 +7,7 @@
PORTNAME= pyPgSQL
PORTVERSION= 2.5.1
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= databases python
MASTER_SITES= SF
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -26,6 +26,16 @@ EXAMPLES= examples/*.py
DATETIME_DEP= ${PYTHON_SITELIBDIR}/mx/DateTime/__init__.py
+OPTIONS= BYTEA_CONN "Apply Bytea connection patch" On
+
+# bypass infrastructure bug
+OPTIONSFILE= ${PORT_DBDIR}/py-${PORTNAME}/options
+
+.if !defined(WITH_BYTEA_CONN)
+PATCH_SITES= http://sourceforge.net/tracker/download.php?group_id=16528&atid=316528&file_id=273956&aid=1939119/
+PATCHFILES= pyPgSQL-patch_byteaconn
+.endif
+
DOCSDIR= ${PREFIX}/share/doc/py-pyPgSQL
EXAMPLESDIR= ${PREFIX}/share/examples/py-pyPgSQL
diff --git a/databases/py-pyPgSQL/distinfo b/databases/py-pyPgSQL/distinfo
index 7c8da503a607..7cc86380120e 100644
--- a/databases/py-pyPgSQL/distinfo
+++ b/databases/py-pyPgSQL/distinfo
@@ -1,3 +1,6 @@
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