pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #10588: inconsistent permissions for InformationSchema tables..
2+ messages / 2 participants
[nested] [flat]

* BUG #10588: inconsistent permissions for InformationSchema tables..
@ 2014-06-09 22:35 tysonzwicker@gmail.com
  2014-06-09 23:10 ` Re: BUG #10588: inconsistent permissions for InformationSchema tables.. Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: tysonzwicker@gmail.com @ 2014-06-09 22:35 UTC (permalink / raw)
  To: pgsql-bugs

The following bug has been logged on the website:

Bug reference:      10588
Logged by:          Tyson Zwicker
Email address:      tysonzwicker@gmail.com
PostgreSQL version: 9.1.9
Operating system:   Win 7 x64
Description:        

In InformationSchema the "constraint_column_usage" table is only accessible
via the super user account, despite other tables (I tested table_constraints
and key_column_usage) being accessible to any account that was GRANTed ALL
permissions.

Furthermore, attempting to select from "constraint_column_usage" did not
throw an error of any kind, it just returned 0 rows.  Once I did the same
query logged in as "postgres" the query returned rows.

I feel that a> An error should be thrown rather than returning 0 rows and
that b> the access of tables in InformationSchema should be consistent
across ALL of the tables.  


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #10588: inconsistent permissions for InformationSchema tables..
  2014-06-09 22:35 BUG #10588: inconsistent permissions for InformationSchema tables.. tysonzwicker@gmail.com
@ 2014-06-09 23:10 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2014-06-09 23:10 UTC (permalink / raw)
  To: tysonzwicker@gmail.com; +Cc: pgsql-bugs

tysonzwicker@gmail.com writes:
> In InformationSchema the "constraint_column_usage" table is only accessible
> via the super user account, despite other tables (I tested table_constraints
> and key_column_usage) being accessible to any account that was GRANTed ALL
> permissions.

It's accessible enough, unless you changed the default:
GRANT SELECT ON constraint_column_usage TO PUBLIC;

> Furthermore, attempting to select from "constraint_column_usage" did not
> throw an error of any kind, it just returned 0 rows.  Once I did the same
> query logged in as "postgres" the query returned rows.

This view follows the SQL standard, which says you can only see rows that
describe tables you own.  A superuser is considered to belong to any
owning role, which is why "postgres" can always see all rows in this view.

> I feel that a> An error should be thrown rather than returning 0 rows and
> that b> the access of tables in InformationSchema should be consistent
> across ALL of the tables.  

A pretty large fraction of the information_schema views have comparable
visibility restrictions.  In any case, since the entire point of
information_schema is to present a standards-compliant view of the
database, we're not going to go against the clear requirement of the
standard.  You're welcome to define your own views that behave however
you like, of course; the underlying pg_catalog tables are all
world-readable.  (Which is something we've gotten flak about from other
parties, but whatever ...)

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2014-06-09 23:10 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2014-06-09 22:35 BUG #10588: inconsistent permissions for InformationSchema tables.. tysonzwicker@gmail.com
2014-06-09 23:10 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox