How to get user privs on a table using select

Started by Gauthier, Davealmost 14 years ago2 messagesgeneral
Jump to latest
#1Gauthier, Dave
dave.gauthier@intel.com

Hi:

Inside a perl/dbi script, I want to determine which privs (select, insert, update, delete, ...) user 'foo' has on table 'footable'. There must be metadata tables or a view that has this.

#2Josh Kupershmidt
schmiddy@gmail.com
In reply to: Gauthier, Dave (#1)
Re: How to get user privs on a table using select

On Wed, Jun 6, 2012 at 1:41 PM, Gauthier, Dave <dave.gauthier@intel.com> wrote:

Inside a perl/dbi script, I want to determine which privs (select, insert,
update, delete, ...) user 'foo' has on table 'footable'.   There must be
metadata tables or a view that has this.

Try:
psql -E dbname
\z tablename

And look at the query printed by psql. You should be able to adapt
that to your needs.

Josh