Re: How to get user privs on a table using select

From: Josh Kupershmidt <schmiddy(at)gmail(dot)com>
To: "Gauthier, Dave" <dave(dot)gauthier(at)intel(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to get user privs on a table using select
Date: 2012-06-06 21:30:41
Message-ID: CAK3UJRFJCkQo5DmRi1_GoJ+usJ8V6OEBk5LwOAtiUb5FTmod6Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Jun 6, 2012 at 1:41 PM, Gauthier, Dave <dave(dot)gauthier(at)intel(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Philipp Kraus 2012-06-06 23:59:57 Re: acessibility for tables
Previous Message Efraín Déctor 2012-06-06 21:25:30 Re: Renumber table rows