summaryrefslogtreecommitdiff
path: root/psycopg/utils.c
diff options
context:
space:
mode:
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>2010-10-08 12:27:47 +0100
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2010-10-08 12:27:47 +0100
commit6e71b3db057eb4a18d5ee5c112a2ab50e0a7c5ab (patch)
tree644b791a4b5b6ab58db70025cea2b85aeb6d8429 /psycopg/utils.c
parentbaf65a0ddae18fc89af36bc1bdf44c41686dee1b (diff)
downloadpsycopg2-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.c32
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';