diff options
| author | Federico Di Gregorio <fog@initd.org> | 2005-03-02 14:16:55 +0000 |
|---|---|---|
| committer | Federico Di Gregorio <fog@initd.org> | 2005-03-02 14:16:55 +0000 |
| commit | e8e6c0ada3c2165e372d2b5ca4235236b0929f81 (patch) | |
| tree | 13093f53dade2e717ccee28f8756d291a879cf56 | |
| parent | 3cf4b7ca6fc59e0dbfdb371c751da42c479a6cf4 (diff) | |
| download | psycopg2-e8e6c0ada3c2165e372d2b5ca4235236b0929f81.tar.gz | |
Preparing release 1.99.12.
| -rw-r--r-- | ChangeLog | 7 | ||||
| -rw-r--r-- | NEWS | 2 | ||||
| -rw-r--r-- | psycopg/adapter_qstring.c | 3 | ||||
| -rw-r--r-- | setup.py | 2 |
4 files changed, 9 insertions, 5 deletions
@@ -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. @@ -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) { @@ -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 |
