Обсуждение: Privilege filters in information schema views

Поиск
Список
Период
Сортировка

Privilege filters in information schema views

От
Dian Fay
Дата:
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 :

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) 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