Re: How to obtain info about the user?

From: William Leite Araújo <william(dot)bh(at)gmail(dot)com>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: "Ismael Almaraz Ezparza" <ismaelpsp(at)hotmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: How to obtain info about the user?
Date: 2008-07-10 16:52:04
Message-ID: bc63ad820807100952i31d4e25cl5404ce3800bc75be@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

*SELECT* pg_has_role() , has_table_privilege(), has_database_privilege(),
has_function_privilege

On Thu, Jul 10, 2008 at 1:15 PM, Joshua D. Drake <jd(at)commandprompt(dot)com>
wrote:

>
>
> On Thu, 2008-07-10 at 11:08 -0500, Ismael Almaraz Ezparza wrote:
> > Hi there,
> > I'm connecting to postgres from java using the postgres driver...
> > and I need to get the info about the user that is connected to the DB,
> lets say
> > for example: name, groups, permisions (select, update, execute)...
> >
> > Does anyone knows how can I get that info?
> >
> > Also, if the user is in the group "admin", I need to geat a list of users
> and
> > the permissions of each... just like pgadmin3 does...
>
> I suggest you turn on query logging to see how pgadmin3 does it.
>
> Joshua D. Drake
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

--
William Leite Araújo
Pai 0.6 beta 2.1 "Dizem que agora melhora..."

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2008-07-10 17:09:45 Re: Inaccurate row count estimation
Previous Message Joshua D. Drake 2008-07-10 16:15:39 Re: How to obtain info about the user?