Re: PID for the conection - Mailing list pgsql-odbc

From Richard Huxton
Subject Re: PID for the conection
Date
Msg-id 200401150938.36451.dev@archonet.com
Whole thread Raw
In response to PID for the conection  ("Jose G. Mendoza" <unixos@prodigy.net.mx>)
List pgsql-odbc
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 | <IDLE>

--
  Richard Huxton
  Archonet Ltd

pgsql-odbc by date:

Previous
From: "Jose G. Mendoza"
Date:
Subject: PID for the conection
Next
From: "Denis"
Date:
Subject: Initially Deferred - FK