diff options
| author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2011-01-01 17:14:54 +0100 |
|---|---|---|
| committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2011-01-01 17:14:54 +0100 |
| commit | 3e94375cf7d196d4d97a0eba05f7527980c72b6d (patch) | |
| tree | ada3416d375591a114285f0cc633c661a582d1f4 /psycopg/connection_int.c | |
| parent | ac258169622ca758757e51338443a4cbed1e605d (diff) | |
| parent | f9be48d89ea73d5d401b6b5b6a271848f259a1c3 (diff) | |
| download | psycopg2-3e94375cf7d196d4d97a0eba05f7527980c72b6d.tar.gz | |
Merge branch 'python2' into python3
Conflicts:
ChangeLog
NEWS-2.3
lib/extensions.py
psycopg/microprotocols.c
setup.py
Diffstat (limited to 'psycopg/connection_int.c')
| -rw-r--r-- | psycopg/connection_int.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/psycopg/connection_int.c b/psycopg/connection_int.c index 83c77ad..6dc7ebb 100644 --- a/psycopg/connection_int.c +++ b/psycopg/connection_int.c @@ -373,6 +373,10 @@ conn_is_datestyle_ok(PGconn *pgconn) ds = PQparameterStatus(pgconn, "DateStyle"); Dprintf("conn_connect: DateStyle %s", ds); + /* pgbouncer does not pass on DateStyle */ + if (ds == NULL) + return 0; + /* Return true if ds starts with "ISO" * e.g. "ISO, DMY" is fine, "German" not. */ return (ds[0] == 'I' && ds[1] == 'S' && ds[2] == 'O'); |
