pg_get_pid
(PHP 4 >= 4.3.0)
pg_get_pid -- PING 資料庫連線
說明
int pg_get_pid ( resource connection)
pg_get_pid() 取得後端(資料庫伺服器進程)的 PID。PID 用來檢查其它進程是否傳送了 NOTIFY 訊息。
pg_get_pid實例
PostgreSQL 後端 PID
<?php
$conn = pg_pconnect("dbname=publisher");
if (!$conn) {
echo "An error occured.\n";
exit;
}
// Backend process PID. Use PID with pg_get_notify()
$pid = pg_get_pid($conn);
?>