Privilege filters in information schema views

From: Dian Fay <dian(dot)m(dot)fay(at)gmail(dot)com>
To: pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Privilege filters in information schema views
Date: 2019-12-04 19:06:25
Message-ID: 83C8A77C-5BCD-41FB-8B22-35999417D32A@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

I recently ran afoul of the filters in the information schema views which restrict the returned records to those entities the querying user has ownership or any privilege on. The detailed documentation on the information schema does mention this, e.g. in https://www.postgresql.org/docs/current/infoschema-tables.html <https://www.postgresql.org/docs/current/infoschema-tables.html> :

> Only those tables and views are shown that the current user has access to (by way of being the owner or having some privilege).

But I think there’s room for a couple of improvements:

* the information schema overview page (https://www.postgresql.org/docs/current/information-schema.html <https://www.postgresql.org/docs/current/information-schema.html>) could mention that, as a general rule, records in the information schema are restricted in this manner; and,
* it’s not clear what recourse a user has if they do need a complete listing of relations, columns, foreign tables, etc. This would especially be the case for users more familiar with other RDBMSs, who may not realize the pg_catalog relations are available. Both the overview and the detail pages could link to the most appropriate pg_catalog page, such as pg_class for information_schema.tables.

I’m happy to submit a patch in the near future, but since this will touch several pages of documentation it seemed best to float the idea here first.

Dian Fay

Browse pgsql-docs by date

  From Date Subject
Next Message soumik.bhattacharjee 2019-12-05 12:22:54 RE: Postgres and Java Microservices Multithreading
Previous Message Eugen Konkov 2019-12-04 11:39:43 Re: Does 'instead of delete' trigger support modification of OLD