Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
Lists: pgsql-generalpgsql-novice

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                           |
  techtable                       | {postgres=arwdDxt/postgres,=ar/postgres}
  techtable_log                   |
  hrtable                         | {postgres=arwdDxt/postgres,=ar/postgres}
  hrtable_log                     |
(5 rows)

mydb=> select current_user;
(1 row)


Thanks, Dipti


pgsql-novice by date

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

pgsql-general by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group