PID for the conection

Поиск
Список
Период
Сортировка
Искать

PID for the conection

От:
"Jose G. Mendoza" <unixos@prodigy.net.mx>
Дата:

How can I obtain the PID for each thread or user connection to the PostgreSQL from the client side?

I’m using the odbc to connect the client application to the PostgreSQL.

 

 

 

Re: PID for the conection

От:
Richard Huxton <dev@archonet.com>
Дата:
On Thursday 15 January 2004 06:44, Jose G. Mendoza wrote:
> How can I obtain the PID for each thread or user connection to the
> PostgreSQL from the client side?
> I'm using the odbc to connect the client application to the PostgreSQL.

Is this what you're after?

SELECT * FROM pg_stat_activity ;
 datid | datname  | procpid | usesysid | usename  | current_query
-------+----------+---------+----------+----------+---------------
 17048 | richardh |   30681 |      100 | richardh | 

-- 
  Richard Huxton
  Archonet Ltd
FAQ