diff options
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 73292b8..8451b45 100644 --- a/psycopg/connection_int.c +++ b/psycopg/connection_int.c @@ -299,6 +299,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'); | 
