2002-10-18 07:52:09 +00:00
|
|
|
--TEST--
|
|
|
|
PostgreSQL pg_get_notify() functions
|
2021-06-11 12:33:54 +00:00
|
|
|
--EXTENSIONS--
|
2021-06-14 12:40:38 +00:00
|
|
|
pgsql
|
2002-10-18 07:52:09 +00:00
|
|
|
--SKIPIF--
|
2023-11-06 22:36:52 +00:00
|
|
|
<?php include("inc/skipif.inc"); ?>
|
2002-10-18 07:52:09 +00:00
|
|
|
--FILE--
|
|
|
|
<?php
|
2003-05-20 00:14:46 +00:00
|
|
|
// optional functions
|
|
|
|
|
2023-11-06 22:36:52 +00:00
|
|
|
include('inc/config.inc');
|
2003-05-20 00:14:46 +00:00
|
|
|
|
|
|
|
$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';
|
2002-10-18 07:52:09 +00:00
|
|
|
?>
|
|
|
|
--EXPECT--
|
|
|
|
OK
|