Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 10D02475B6F for ; Wed, 5 Jun 2002 14:38:48 -0400 (EDT) Received: from brasileiro.net (slxwy.dorms.usu.edu [129.123.236.160]) by postgresql.org (Postfix) with ESMTP id 0595F475966 for ; Wed, 5 Jun 2002 14:38:47 -0400 (EDT) Received: from roberto by brasileiro.net with local (Exim 3.35 #1 (Debian)) id 17Ffhu-0003HM-00 for ; Wed, 05 Jun 2002 12:40:30 -0600 Date: Wed, 5 Jun 2002 12:40:30 -0600 From: Roberto Mello To: pgsql-sql@postgresql.org Subject: Getting PID of current logged user Message-ID: <20020605184030.GC1307@cc.usu.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline User-Agent: Mutt/1.3.28i X-message-flag: Please consider using an e-mail program other than Outlook. It's insecure. X-Archive-Number: 200206/41 X-Sequence-Number: 8006 Hi all, On http://www.postgresql.org/idocs/index.php?monitoring-stats.html I found pg_stat_get_backend_userid(integer) that will give me the user id of the current logged in user. But I need to pass the oid of the backend. I see a function to return the oid of all backends, but how do I find out the oid of _my_ backend (say I'm executing this in a PL/pgSQL function)? Thanks, -Roberto -- +----| http://fslc.usu.edu/ USU Free Software & GNU/Linux Club |------+ Roberto Mello - Computer Science, USU - http://www.brasileiro.net/ http://www.sdl.usu.edu/ - Space Dynamics Lab, Developer