Re: catalog view use to find DATABASE, LANGUAGE, TABLESPACE, SCHEMA, SEQUENCE privileges granted to user or role

From: "Louis Lam" <louis(dot)lam(at)guardium(dot)com>
To: "Martijn van Oosterhout" <kleptog(at)svana(dot)org>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: catalog view use to find DATABASE, LANGUAGE, TABLESPACE, SCHEMA, SEQUENCE privileges granted to user or role
Date: 2009-06-05 17:31:18
Message-ID: 6D8540A29236624096E719740FC5C75306A1E190@guardium-01-ex.atlarge.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Matijn,

Thank you very much for the suggestion. I was able to figure this out
yesterday by running this query to get the source code from the view
then strip out the permission check and it work great.

select * from pg_views where viewname = 'table_privileges'

Thank you and Tom Lane for the help

Louis.

-----Original Message-----
From: Martijn van Oosterhout [mailto:kleptog(at)svana(dot)org]
Sent: Friday, June 05, 2009 1:18 PM
To: Louis Lam
Cc: Tom Lane; pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] catalog view use to find DATABASE,
LANGUAGE,TABLESPACE, SCHEMA, SEQUENCE privileges granted to user or role

On Wed, Jun 03, 2009 at 01:46:00PM -0500, Louis Lam wrote:
> So if I need to find out what table, view and function are granted to
> user or role. I should be force to use pg_class and pg_proc? Unless
> I can have superuser access?

Use \dv+ on the information_schema view you want and copy the query.
Take out the permission check and you're done.

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Joshua D. Drake 2009-06-05 17:36:50 Re: How to automatically propagate new/changed database functions from one database to another
Previous Message Andy Colson 2009-06-05 17:27:46 Re: maintaining referential integrity