| From: | Michael Fuhr <mike(at)fuhr(dot)org> | 
|---|---|
| To: | Armen Rizal <armenrz(at)starprise(dot)net> | 
| Cc: | pgsql-general(at)postgresql(dot)org | 
| Subject: | Re: How to get user's role? | 
| Date: | 2004-09-30 14:21:24 | 
| Message-ID: | 20040930142124.GA72856@winnie.fuhr.org | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-general | 
On Thu, Sep 30, 2004 at 10:26:41AM +0700, Armen Rizal wrote:
>  
> I want to get what roles/groups that the current user is member of.
> I tried to use the following commands but they both returned no rows.
>  
> SELECT * FROM information_schema.enabled_roles
> SELECT * FROM information_schema.applicable_roles
What version of PostgreSQL are you using?  Are you sure the current
user belongs to any groups?  What's the output of the following
queries?
SELECT current_user;
SELECT usename, usesysid FROM pg_user WHERE usename = current_user;
SELECT * FROM pg_group;
-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/
| From | Date | Subject | |
|---|---|---|---|
| Next Message | peter pilsl | 2004-09-30 14:28:32 | problems with lower() and unicode-databases | 
| Previous Message | Alvaro Herrera | 2004-09-30 14:03:29 | Re: dangling permission on tables after drop user. |