I can't retrive payload field of pgnotify object. Here's an example script which describes my problem:
<?php
$conn = pg_connect("host=stevie.heliohost.org port=5432 dbname= user= password=");
pg_query($conn, "LISTEN channel;");
pg_query($conn, "NOTIFY channel, 'message';");
do{
$notify = pg_get_notify($conn);
Sleep(1);
}while(!$notify);
if (!$notify) {
echo "No messages ";
} else {
echo json_encode($notify);
}
?>
Result when ran on stevie server: {"message":"channel","pid":11109} Expected result (recived after running this code on localhost xampp server): {"message":"channel","pid":9225,"payload":"message"} I belive that the problem might be the version of the pgsql extension. Is there any chance for upgrade or maybe I'm missing something and there is other solution to this problem? Any help would be appreciated.