summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index 49069f7..9fdf0b5 100644
--- a/setup.py
+++ b/setup.py
@@ -415,6 +415,13 @@ class psycopg_build_ext(build_ext):
define_macros.append(("PG_VERSION_HEX", "0x%02X%02X%02X" %
(int(pgmajor), int(pgminor), int(pgpatch))))
+
+ # enable lo64 if postgres >= 9.3
+ if int(pgmajor) >= 9 and int(pgminor) >= 3:
+ define_macros.append(("HAVE_LO64", "1"))
+ else:
+ define_macros.append(("HAVE_LO64", "0"))
+
except Warning:
w = sys.exc_info()[1] # work around py 2/3 different syntax
sys.stderr.write("Error: %s\n" % w)