summaryrefslogtreecommitdiff
path: root/psycopg/utils.c
diff options
context:
space:
mode:
authorJames Henstridge <james@jamesh.id.au>2009-02-17 16:00:52 +0900
committerJames Henstridge <james@jamesh.id.au>2009-02-17 16:00:52 +0900
commit9067bde8030eb22cbbd289c1a173af8e68956fc0 (patch)
tree2ebc83f30e2e685584c249109514c7e1d84d3a08 /psycopg/utils.c
parent2a94dfae47c10426be7e9b7babdf89548cfbe24d (diff)
downloadpsycopg2-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.c4
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);