summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--NEWS2
-rw-r--r--psycopg/adapter_qstring.c3
-rw-r--r--setup.py2
4 files changed, 9 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 6b34265..634dfcc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2005-03-02 Federico Di Gregorio <fog@debian.org>
+ * Release 1.99.12.
+
+ * psycopg/adapter_qstring.c (qstring_quote): we now use
+ PyString_AsStringAndSize() instead of strlen() that would stop at
+ the first embedded \0 (but note that libpq quoting function will
+ truncate the string anyway!)
+
* COPY TO implemented using both old and new (v3) protocol.
* psycopg/pqpath.c (_pq_copy_out_v3): implemented and working.
diff --git a/NEWS b/NEWS
index f803540..d5ff88a 100644
--- a/NEWS
+++ b/NEWS
@@ -3,8 +3,6 @@ What's new in psycopg 1.99.12
* .rowcount should be ok and in sync with psycopg 1.
-* Strings can contain NULLs and are quoted accordingly.
-
* Implemented the new COPY FROM/COPY TO code when connection to the
backend using libpq protocol 3 (this also removes all asprintf calls:
build on win32 works again.) A protocol 3-enabled psycopg *can*
diff --git a/psycopg/adapter_qstring.c b/psycopg/adapter_qstring.c
index c3ae503..755cdf1 100644
--- a/psycopg/adapter_qstring.c
+++ b/psycopg/adapter_qstring.c
@@ -123,8 +123,7 @@ qstring_quote(qstringObject *self)
}
/* encode the string into buffer */
- s = PyString_AsString(str);
- len = strlen(s);
+ PyString_AsStringAndSize(str, &s, &len);
buffer = (char *)PyMem_Malloc((len*2+3) * sizeof(char));
if (buffer == NULL) {
diff --git a/setup.py b/setup.py
index 501ce78..a31817a 100644
--- a/setup.py
+++ b/setup.py
@@ -47,7 +47,7 @@ from distutils.core import setup, Extension
from distutils.sysconfig import get_python_inc
import distutils.ccompiler
-PSYCOPG_VERSION = '1.99.11/devel'
+PSYCOPG_VERSION = '1.99.12'
version_flags = []
have_pydatetime = False