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: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <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-03 18:46:00
Message-ID: 6D8540A29236624096E719740FC5C75306A1D6F1@guardium-01-ex.atlarge.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom,

This sound pretty ugly. Are you saying that there is no way I can
select all the rows for views in the information_schema, unless I am the
database owner or superuser? in the server? I can't just grant a user
some type of system view privileges to override this feature like other
database type?

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?

Thanks,
Louis.

-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: Wednesday, June 03, 2009 2:15 PM
To: Louis Lam
Cc: 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

"Louis Lam" <louis(dot)lam(at)guardium(dot)com> writes:
> Since you know this are well. Do you know if there is some kind of
> records filtering use by PostgreSQL when selecting system objects?
For
> example, I run this query by PostgreSQL user.

> select count(*) from information_schema.table_privileges;

The information_schema views filter out information about objects that
you don't have any privileges for. This is required by SQL spec.
It's a bit pointless, since anybody can look at the underlying catalogs,
but we make them follow spec anyway.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joshua D. Drake 2009-06-03 18:53:55 Re: warm standby with WAL shipping
Previous Message Geoffrey 2009-06-03 18:43:22 Re: warm standby with WAL shipping