On Tue, Sep 14, 2010 at 1:01 PM, Carlos Mennens
<carlos.menn...@gmail.com> wrote:
> I can't find in the docs or using Google how one can identify which
> user is currently logged in to psql. I search for the command that if
> for some reason I forget which user I am logged in as, rather than
> logging out of PostgreSQL, there has to be a command that shows me who
> I am and also what kind of special permissions my current user has.
> Can anyone please assist me or point me in the right direction?

I don't have the entire answer.  But here is a place to start:

http://www.postgresql.org/docs/9.0/static/functions-info.html

Note that there is a slight distinction between current_user and session_user.

postgres=> select user, current_user, session_user;
 current_user | current_user | session_user
--------------+--------------+--------------
 broersr      | broersr      | broersr
(1 row)


-- 
Regards,
Richard Broersma Jr.

Visit the Los Angeles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to