pg_untrace
PHP function
Edit on GitHub ✎
(PHP 4 >= 4.0.1, PHP 5, PHP 7, PHP 8)
Disable tracing of a PostgreSQL connection
Description
pg_untrace(PgSql\Connection|null $connection = null): true
Stop tracing started by pg_trace().
Parameters
connectionConnection-with-nullable-default
Return Values
Always
Changelog
| Version | Description |
|---|---|
| 8.0.0 | connection is now nullable. |
Examples
pg_untrace() example
php
<?php
$pgsql_conn = pg_connect("dbname=mark host=localhost");
if ($pgsql_conn) {
pg_trace('/tmp/trace.log', 'w', $pgsql_conn);
pg_query("SELECT 1");
pg_untrace($pgsql_conn);
// Now tracing of backend communication is disabled
} else {
print pg_last_error($pgsql_conn);
exit;
}
?>