Re: PID for the conection

From: Richard Huxton <dev(at)archonet(dot)com>
To: "Jose G(dot) Mendoza" <unixos(at)prodigy(dot)net(dot)mx>, pgsql-odbc(at)postgresql(dot)org
Subject: Re: PID for the conection
Date: 2004-01-15 09:38:36
Message-ID: 200401150938.36451.dev@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message Denis 2004-01-15 13:04:39 Initially Deferred - FK
Previous Message Jose G. Mendoza 2004-01-15 06:44:53 PID for the conection