]> granicus.if.org Git - php/commitdiff
Reset vars when reusing a persistent connection as requested from postgres developers
authorMarcus Boerger <helly@php.net>
Mon, 21 Jul 2003 20:53:00 +0000 (20:53 +0000)
committerMarcus Boerger <helly@php.net>
Mon, 21 Jul 2003 20:53:00 +0000 (20:53 +0000)
ext/pgsql/pgsql.c

index 690b35e0aa5d2eb377feb786980e3c811c3805dd..381da5eaf324e336f0b852626135a56621e63663 100644 (file)
@@ -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);