Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 0EB74475A1C for ; Tue, 5 Mar 2002 18:38:10 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.4/8.11.4) with ESMTP id g25NbNS19418; Tue, 5 Mar 2002 18:37:23 -0500 (EST) To: Kovacs Zoltan Cc: Josh Berkus , pgsql-sql@postgresql.org Subject: Re: getting pid of backend In-reply-to: References: Comments: In-reply-to Kovacs Zoltan message dated "Tue, 05 Mar 2002 23:49:55 +0100" Date: Tue, 05 Mar 2002 18:37:23 -0500 Message-ID: <19415.1015371443@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200203/61 X-Sequence-Number: 6943 Kovacs Zoltan writes: > I mean the current pid number of the actual connection. Not the postmaster > process, I need the pid of the currently running postgres. :-) I don't believe it's available as a SQL query, but libpq can tell you what it is. Probably a more interesting question is "why do you want to know?". I can't offhand think of a really good reason to use the backend pid for anything on the client side, other than distinguishing self-notifies from other notifies, which is not something you can do at the SQL level anyway. regards, tom lane