Re: BUG #17511: Inconsistent permissions on some information_schema tables - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #17511: Inconsistent permissions on some information_schema tables
Date
Msg-id 975366.1654561211@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #17511: Inconsistent permissions on some information_schema tables  (Kirk Parker <khp@equatoria.us>)
Responses Re: BUG #17511: Inconsistent permissions on some information_schema tables  (Kirk Parker <khp@equatoria.us>)
List pgsql-bugs
Kirk Parker <khp@equatoria.us> writes:
> Tom Lane's answer makes sense, but I can't see where the permissions are
> lacking--the user seems to have all needed rights on all the relevant
> tables (and the same as the DB owner, for that matter.)

[ looks closer... ] constraint_column_usage has a tighter filter than
I would have guessed:

\d+ information_schema.constraint_column_usage
...
View definition:
...
  WHERE pg_has_role(x.tblowner, 'USAGE'::text);

So you have to actually *be* the table owner, or at least have been
GRANTed that role, in order to see entries about the table in it.
This seems to match what it says in the spec, but I have to confess
bafflement as to why they made this one more restrictive than
either table_constraints or key_column_usage.

            regards, tom lane



pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #17512: Process running query fails with SIGSEV - nodeMemoize.c:349
Next
From: Kirk Parker
Date:
Subject: Re: BUG #17511: Inconsistent permissions on some information_schema tables