diff options
| author | James Henstridge <james@jamesh.id.au> | 2009-02-17 16:00:52 +0900 |
|---|---|---|
| committer | James Henstridge <james@jamesh.id.au> | 2009-02-17 16:00:52 +0900 |
| commit | 9067bde8030eb22cbbd289c1a173af8e68956fc0 (patch) | |
| tree | 2ebc83f30e2e685584c249109514c7e1d84d3a08 /psycopg/utils.c | |
| parent | 2a94dfae47c10426be7e9b7babdf89548cfbe24d (diff) | |
| download | psycopg2-9067bde8030eb22cbbd289c1a173af8e68956fc0.tar.gz | |
* psycopg/utils.c (psycopg_escape_string): same here.
* psycopg/adapter_binary.c (binary_escape): simplify PostgreSQL
version check.
* setup.py (psycopg_build_ext.finalize_options): use a single
define of the PostgreSQL version in a form that can easily be used
by #ifdefs.
Diffstat (limited to 'psycopg/utils.c')
| -rw-r--r-- | psycopg/utils.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/psycopg/utils.c b/psycopg/utils.c index 03ec9c8..ad346d7 100644 --- a/psycopg/utils.c +++ b/psycopg/utils.c @@ -31,9 +31,7 @@ psycopg_escape_string(PyObject *obj, const char *from, Py_ssize_t len, #ifndef PSYCOPG_OWN_QUOTING { - #if PG_MAJOR_VERSION > 8 || \ - (PG_MAJOR_VERSION == 8 && PG_MINOR_VERSION > 1) || \ - (PG_MAJOR_VERSION == 8 && PG_MINOR_VERSION == 1 && PG_PATCH_VERSION >= 4) + #if PG_VERSION_HEX >= 0x080104 int err; if (conn && conn->pgconn) ql = PQescapeStringConn(conn->pgconn, to+eq+1, from, len, &err); |
