We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7eb3e9c commit 5633cc6Copy full SHA for 5633cc6
ext/pgsql/pgsql.c
@@ -172,6 +172,7 @@ static void pgsql_link_free(pgsql_link_handle *link)
172
PQclear(res);
173
}
174
if (!link->persistent) {
175
+ PQuntrace(link->conn);
176
PQfinish(link->conn);
177
178
PGG(num_links)--;
ext/pgsql/tests/pg_trace.phpt
@@ -0,0 +1,20 @@
1
+--TEST--
2
+pg_trace
3
+--EXTENSIONS--
4
+pgsql
5
+--SKIPIF--
6
+<?php include("skipif.inc"); ?>
7
+--FILE--
8
+<?php
9
+
10
+include('config.inc');
11
12
+$db = pg_connect($conn_str);
13
+$tracefile = __DIR__ . '/trace.tmp';
14
15
+var_dump(pg_trace($tracefile, 'w', $db));
16
+$res = pg_query($db, 'select 1');
17
18
+?>
19
+--EXPECTF--
20
+bool(true)
0 commit comments