summaryrefslogtreecommitdiff
path: root/psycopg/adapter_qstring.h
diff options
context:
space:
mode:
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>2016-07-01 11:17:55 +0100
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2016-07-01 11:17:55 +0100
commit600c744fba9f717095d4107d114bbfd0b91c4f12 (patch)
tree11990a3d184c583ffb5fb971459eacda32c3624f /psycopg/adapter_qstring.h
parent556f25153f1d7195de709448a395894591f6f992 (diff)
downloadpsycopg2-qstring-writable-encoding.tar.gz
Work in progress on writable encodingqstring-writable-encoding
Would help using adapt(unicode) to quote strings without a connection, see ticket #331. Currently in heisenbug state: if test_connection_wins_anyway and test_encoding_default run (in this order), the latter fail because the returned value is "'\xe8 '", with an extra space. Skipping the first test, the second succeed. The bad value is returned by the libpq: ql = PQescapeString(to+eq+1, from, len); just returns len = 2 and an extra space in the string... meh.
Diffstat (limited to 'psycopg/adapter_qstring.h')
-rw-r--r--psycopg/adapter_qstring.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/psycopg/adapter_qstring.h b/psycopg/adapter_qstring.h
index b7b086f..8abdc5f 100644
--- a/psycopg/adapter_qstring.h
+++ b/psycopg/adapter_qstring.h
@@ -39,6 +39,9 @@ typedef struct {
PyObject *buffer;
connectionObject *conn;
+
+ const char *encoding;
+
} qstringObject;
#ifdef __cplusplus