Thread: Privileges on information_schema

Privileges on information_schema

From
"Christian Rengstl"
Date:
Hi list,

whenever I execute the following query as admin I get all results, but
as soon as I execute it as a less-privileged user the result is empty.
SELECT * FROM information_schema.schemata

Strange enough, when I query information_schema.tables I can see
everything both as a normal user and admin. I tried explicitly setting
the SELECT privileges on the above mentioned view but without success.
I really appreciate any help.



Christian Rengstl M.A.
Klinik und Poliklinik für Innere Medizin II
Kardiologie - Forschung
Universitätsklinikum Regensburg
B3 1.388
Franz-Josef-Strauss-Allee 11
93053 Regensburg
Tel.: +49-941-944-7230




Re: Privileges on information_schema

From
Tom Lane
Date:
"Christian Rengstl" <Christian.Rengstl@klinik.uni-regensburg.de> writes:
> whenever I execute the following query as admin I get all results, but
> as soon as I execute it as a less-privileged user the result is empty.
> SELECT * FROM information_schema.schemata

The SQL standard specifies that information_schema.schemata shows you
only schemas you own.  We are slightly laxer: we'll show you a schema
if you're a member of its owning role.

            regards, tom lane