Merge branch 'fix-520'

This commit is contained in:
Daniele Varrazzo 2017-03-02 19:36:45 +00:00
commit d007dc3249
3 changed files with 3 additions and 2 deletions

1
NEWS
View File

@ -6,6 +6,7 @@ What's new in psycopg 2.7.1
- Ignore `!None` arguments passed to `~psycopg2.connect()` and
`~psycopg2.extensions.make_dsn()` (:ticket:`#517`).
- Fixed build with libpq versions < 9.3 (:ticket:`#520`).
What's new in psycopg 2.7

View File

@ -28,7 +28,7 @@
#include "psycopg/config.h"
/* type and constant definitions from internal postgres include */
typedef unsigned PG_INT64_TYPE XLogRecPtr;
typedef uint64_t XLogRecPtr;
/* have to use lowercase %x, as PyString_FromFormat can't do %X */
#define XLOGFMTSTR "%x/%x"

View File

@ -313,7 +313,7 @@ def libpq_version():
import psycopg2
v = psycopg2.__libpq_version__
if v >= 90100:
v = psycopg2.extensions.libpq_version()
v = min(v, psycopg2.extensions.libpq_version())
return v