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, pgsql-novice <pgsql-novice(at)postgresql(dot)org>
Subject: Get the list of permissions on schema for current user
Date: 2010-03-30 11:05:27
Message-ID: d5b05a951003300405t47e4e552n249e172386cddff6@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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Oliver Kohll - Mailing Lists 2010-03-30 11:06:16 Running/cumulative count using windows
Previous Message Szymon Guz 2010-03-30 10:42:41 Re: insert into test_b (select * from test_a) with different column order

Browse pgsql-novice by date

  From Date Subject
Next Message Tyler Hains 2010-03-30 12:46:53 FW: plpgsql function help
Previous Message Thom Brown 2010-03-30 10:16:11 Re: What happens if the partitions overlap?