Get the list of permissions on schema for current user

From: dipti shah <shahdipti1980(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Get the list of permissions on schema for current user
Date: 2010-04-01 05:39:28
Message-ID: h2id5b05a951003312239mccf5abffg2a765f7ab56bb7c7@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-novice

Hi,

I ran below command to list out all privileges of objects if "mydb" schema.
Actually, I want to know what are the permissions "user1" has on mydb
schema. Could you please tell me how to do this?

mydb=# select pc.relname, pc.relacl from pg_class pc, pg_namespace pn where
pc.relnamespace=pn.oid and pn.nspname='mydb';
relname | relacl
----------------------------------+-----------------------------------------------
mylog |
{postgres=arwdDxt/postgres,=arwdDxt/postgres}
techtable | {postgres=arwdDxt/postgres,=ar/postgres}
techtable_log |
hrtable | {postgres=arwdDxt/postgres,=ar/postgres}
hrtable_log |
(5 rows)

mydb=> select current_user;
current_user
--------------
user1
(1 row)

mydb=>

Thanks, Dipti

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Nikhil G. Daddikar 2010-04-01 05:47:24 Re: "1-Click" installer problems
Previous Message Craig Ringer 2010-04-01 04:11:34 Re: "1-Click" installer problems

Browse pgsql-novice by date

  From Date Subject
Next Message Jasen Betts 2010-04-01 06:52:59 Re: slow plan on join when adding where clause
Previous Message Tom Lane 2010-03-31 21:15:51 Re: Fwd: Need Help Enabling Remote Connections