pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: Jose G. Mendoza <unixos@prodigy.net.mx>
To: pgsql-odbc@postgresql.org
Subject: Re: PID for the conection
Date: Thu, 15 Jan 2004 09:38:36 +0000
Message-ID: <200401150938.36451.dev@archonet.com> (raw)
In-Reply-To: <000001c3db33$1577be90$0a00a8c0@PePiTo>
References: <000001c3db33$1577be90$0a00a8c0@PePiTo>

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



view thread (2+ messages)

Message-ID: <200401150938.36451.dev@archonet.com>
Permalink:  ../200401150938.36451.dev@archonet.com/
Also on:    postgresql.org/message-id/200401150938.36451.dev@archonet.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: dev@archonet.com, unixos@prodigy.net.mx
  Subject: Re: PID for the conection
  In-Reply-To: <200401150938.36451.dev@archonet.com>
  References: <000001c3db33$1577be90$0a00a8c0@PePiTo> <200401150938.36451.dev@archonet.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox