diff options
| author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2010-10-08 12:27:47 +0100 |
|---|---|---|
| committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2010-10-08 12:27:47 +0100 |
| commit | 6e71b3db057eb4a18d5ee5c112a2ab50e0a7c5ab (patch) | |
| tree | 644b791a4b5b6ab58db70025cea2b85aeb6d8429 /psycopg/utils.c | |
| parent | baf65a0ddae18fc89af36bc1bdf44c41686dee1b (diff) | |
| download | psycopg2-6e71b3db057eb4a18d5ee5c112a2ab50e0a7c5ab.tar.gz | |
Dropped PSYCOPG_OWN_QUOTING.
It was deprecated for version 2.1. There are bugs to be fixed made more
complex by its presence and it doesn't keep into account PostgreSQL 9.0
new binary format.
Time to go!
Diffstat (limited to 'psycopg/utils.c')
| -rw-r--r-- | psycopg/utils.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/psycopg/utils.c b/psycopg/utils.c index d0b7929..cb8b6c7 100644 --- a/psycopg/utils.c +++ b/psycopg/utils.c @@ -50,7 +50,6 @@ psycopg_escape_string(PyObject *obj, const char *from, Py_ssize_t len, return NULL; } - #ifndef PSYCOPG_OWN_QUOTING { #if PG_VERSION_HEX >= 0x080104 int err; @@ -60,37 +59,6 @@ psycopg_escape_string(PyObject *obj, const char *from, Py_ssize_t len, #endif ql = PQescapeString(to+eq+1, from, len); } - #else - { - int i, j; - - for (i=0, j=eq+1; i<len; i++) { - switch(from[i]) { - - case '\'': - to[j++] = '\''; - to[j++] = '\''; - break; - - case '\\': - to[j++] = '\\'; - to[j++] = '\\'; - break; - - case '\0': - /* do nothing, embedded \0 are discarded */ - break; - - default: - to[j++] = from[i]; - } - } - to[j] = '\0'; - - Dprintf("qstring_quote: to = %s", to); - ql = strlen(to); - } - #endif if (eq) to[0] = 'E'; |
