File tree 3 files changed +15
-2
lines changed
3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,9 @@ $db = pg_connect($conn_str);
20
20
21
21
_set_lc_messages ();
22
22
23
+ $ res = pg_query ($ db , 'SET client_min_messages TO NOTICE; ' );
24
+ var_dump ($ res );
25
+
23
26
pg_query ($ db , "BEGIN; " );
24
27
pg_query ($ db , "BEGIN; " );
25
28
@@ -33,6 +36,8 @@ echo "pg_last_notice() is Ok\n";
33
36
34
37
?>
35
38
--EXPECTF--
39
+ resource(%d) of type (pgsql result)
40
+
36
41
Notice: pg_query(): %s already a transaction in progress in %s on line %d
37
42
%s already a transaction in progress
38
43
pg_last_notice() is Ok
Original file line number Diff line number Diff line change 37
37
end;
38
38
' LANGUAGE plpgsql; " );
39
39
40
-
40
+ $ res = pg_query ($ dbh , 'SET client_min_messages TO NOTICE; ' );
41
+ var_dump ($ res );
41
42
$ res = pg_query ($ dbh , 'SELECT test_notice() ' );
43
+ var_dump ($ res );
42
44
$ row = pg_fetch_row ($ res , 0 );
43
45
var_dump ($ row );
44
46
pg_free_result ($ res );
@@ -52,6 +54,8 @@ pg_close($dbh);
52
54
?>
53
55
===DONE===
54
56
--EXPECTF--
57
+ resource(%d) of type (pgsql result)
58
+ resource(%d) of type (pgsql result)
55
59
array(1) {
56
60
[0]=>
57
61
string(1) "f"
Original file line number Diff line number Diff line change @@ -37,10 +37,13 @@ begin
37
37
end;
38
38
' LANGUAGE plpgsql; " );
39
39
40
+ $ res = pg_query (dbh, 'SET client_min_messages TO NOTICE; ' );
41
+ var_dump ($ res );
42
+
40
43
function tester () {
41
44
$ res = pg_query (dbh, 'SELECT test_notice() ' );
42
45
$ row = pg_fetch_row ($ res , 0 );
43
- var_dump ($ row );
46
+ var_dump ($ row );
44
47
pg_free_result ($ res );
45
48
if ($ row [0 ] == 'f ' )
46
49
{
@@ -54,6 +57,7 @@ pg_close(dbh);
54
57
?>
55
58
===DONE===
56
59
--EXPECTF--
60
+ resource(%d) of type (pgsql result)
57
61
array(1) {
58
62
[0]=>
59
63
string(1) "f"
You can’t perform that action at this time.
0 commit comments