downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

pg_get_result> <pg_get_notify
[edit] Last updated: Fri, 26 Apr 2013

view this page in

pg_get_pid

(PHP 4 >= 4.3.0, PHP 5)

pg_get_pidGets the backend's process ID

Description

int pg_get_pid ( resource $connection )

pg_get_pid() gets the backend's (database server process) PID. The PID is useful to determine whether or not a NOTIFY message received via pg_get_notify() is sent from another process or not.

Parameters

connection

PostgreSQL database connection resource.

Return Values

The backend database process ID.

Examples

Example #1 PostgreSQL backend PID

<?php 
$conn 
pg_pconnect("dbname=publisher");
if (!
$conn) {
  echo 
"An error occurred.\n";
  exit;
}

// Backend process PID. Use PID with pg_get_notify()
$pid pg_get_pid($conn);
?>

See Also



add a note add a note User Contributed Notes pg_get_pid - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites