php8.5
Home/ Manual/ pgsql / functions/ pg_untrace

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

connection

Connection-with-nullable-default

Return Values

Always

Changelog

VersionDescription
8.0.0connection 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;
}
?>

See Also

Source: reference/pgsql/functions/pg-untrace.xml · from the official PHP manual (php/doc-en)