From: Marcus Boerger Date: Mon, 21 Jul 2003 20:53:00 +0000 (+0000) Subject: Reset vars when reusing a persistent connection as requested from postgres developers X-Git-Tag: BEFORE_ARG_INFO~149 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6175f0a4c9814d459fd29bfa30811dead3a648ba;p=php Reset vars when reusing a persistent connection as requested from postgres developers --- 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);