summaryrefslogtreecommitdiff
path: root/ext/pgsql/pgsql.c
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2003-07-21 20:53:00 +0000
committerMarcus Boerger <helly@php.net>2003-07-21 20:53:00 +0000
commit6175f0a4c9814d459fd29bfa30811dead3a648ba (patch)
treef5ffff8a1dcb87516dfe554293d39a449d64e64d /ext/pgsql/pgsql.c
parentc89ade3b66bd10bf83810acdd4f215c50f4d2bfb (diff)
downloadphp-git-6175f0a4c9814d459fd29bfa30811dead3a648ba.tar.gz
Reset vars when reusing a persistent connection as requested from postgres developers
Diffstat (limited to 'ext/pgsql/pgsql.c')
-rw-r--r--ext/pgsql/pgsql.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
index 690b35e0aa..381da5eaf3 100644
--- a/ext/pgsql/pgsql.c
+++ b/ext/pgsql/pgsql.c
@@ -624,6 +624,11 @@ static void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
goto err;
}
}
+ if (atof(PG_VERSION) >= 7.2) {
+ PGresult *pg_result;
+ pg_result = PQexec(le->ptr, "RESET ALL");
+ PQclear(pg_result);
+ }
pgsql = (PGconn *) le->ptr;
}
ZEND_REGISTER_RESOURCE(return_value, pgsql, le_plink);