1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/ext/pgsql/tests/pg_trace.phpt
David Carlier 7ec8ae12c4 ext/pgsql: pg_trace allow to refine its trace mode via 2 new constants.
- PGSQL_TRACE_SUPPRESS_TIMESTAMPS.
- PGSQL_TRACE_REGRESS_MODE to have a more verbose and observable
output to check possible regressions.

Close GH-11041
2023-05-05 11:05:03 +01:00

27 lines
475 B
PHP

--TEST--
pg_trace
--EXTENSIONS--
pgsql
--SKIPIF--
<?php include("skipif.inc"); ?>
--FILE--
<?php
include('config.inc');
$db = pg_connect($conn_str);
$tracefile = __DIR__ . '/trace.tmp';
try {
pg_trace($tracefile, 'w', $db, 56432);
} catch (ValueError $e) {
echo $e->getMessage() . PHP_EOL;
}
var_dump(pg_trace($tracefile, 'w', $db, 0));
$res = pg_query($db, 'select 1');
?>
--EXPECT--
pg_trace(): Argument #4 ($trace_mode) cannot set as trace is unsupported
bool(true)