pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Roberto Mello <rmello@cc.usu.edu>
To: pgsql-sql@postgresql.org
Subject: Getting PID of current logged user
Date: Wed, 5 Jun 2002 12:40:30 -0600
Message-ID: <20020605184030.GC1307@cc.usu.edu> (raw)

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    



Message-ID: <20020605184030.GC1307@cc.usu.edu>
Permalink:  ../20020605184030.GC1307@cc.usu.edu/
Also on:    postgresql.org/message-id/20020605184030.GC1307@cc.usu.edu

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: rmello@cc.usu.edu
  Subject: Re: Getting PID of current logged user
  In-Reply-To: <20020605184030.GC1307@cc.usu.edu>

* 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