summaryrefslogtreecommitdiff
path: root/ext/pgsql/tests/21pg_get_notify.phpt
blob: 9171fc01aa45ba3124961dd4d72d519c157eb714 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--TEST--
PostgreSQL pg_get_notify() functions
--SKIPIF--
<?php include("skipif.inc"); ?>
--FILE--
<?php
// optional functions

include('config.inc');

$db = pg_connect($conn_str);
pg_query($db, 'LISTEN test_msg');
pg_query($db, 'NOTIFY test_msg');

$msg = pg_get_notify($db);

isset($msg['message'],$msg['pid']) ? print 'OK' : print 'NG';
?>
--EXPECT--
OK