2002-04-05 06:30:18 +00:00
|
|
|
--TEST--
|
|
|
|
PostgreSQL notice function
|
|
|
|
--SKIPIF--
|
|
|
|
<?php include("skipif.inc"); ?>
|
2003-05-30 15:07:02 +00:00
|
|
|
--INI--
|
|
|
|
pgsql.log_notice=1
|
|
|
|
pgsql.ignore_notices=0
|
2002-04-05 06:30:18 +00:00
|
|
|
--FILE--
|
|
|
|
<?php
|
2003-05-20 00:14:46 +00:00
|
|
|
include 'config.inc';
|
|
|
|
|
|
|
|
$db = pg_connect($conn_str);
|
2005-12-31 17:42:27 +00:00
|
|
|
pg_exec($db, "SET LC_MESSAGES='C';");
|
2003-05-20 00:14:46 +00:00
|
|
|
pg_query($db, "BEGIN;");
|
|
|
|
pg_query($db, "BEGIN;");
|
|
|
|
|
|
|
|
$msg = pg_last_notice($db);
|
|
|
|
if ($msg === FALSE) {
|
|
|
|
echo "Cannot find notice message in hash\n";
|
|
|
|
var_dump($msg);
|
|
|
|
}
|
2003-05-30 15:42:46 +00:00
|
|
|
echo $msg."\n";
|
2003-05-20 00:14:46 +00:00
|
|
|
echo "pg_last_notice() is Ok\n";
|
|
|
|
|
2002-04-05 06:30:18 +00:00
|
|
|
?>
|
2003-05-30 15:42:46 +00:00
|
|
|
--EXPECTF--
|
2003-12-23 17:33:06 +00:00
|
|
|
Notice: pg_query(): %s already a transaction in progress in %s on line %d
|
|
|
|
%s already a transaction in progress
|
2002-04-05 06:30:18 +00:00
|
|
|
pg_last_notice() is Ok
|