information_schema.columns.character_octet_length unavailable if no access to pg_database

Started by Fabien Meghaziover 8 years ago2 messagesbugs
Jump to latest
#1Fabien Meghazi
amigrave@gmail.com

Tested against PostgreSQL version 9.6 and 9.5

On any database, when the pg_database access is restraint for standard
users:

psql> REVOKE ALL ON pg_database FROM public;

it not possible anymore to query the field character_octet_length from the
view information_schema.columns:

psql> SELECT character_octet_length FROM information_schema.columns;
ERROR: permission denied for relation pg_database
CONTEXT: SQL function "_pg_char_octet_length" statement 1

The same problem can be found in information_schema.domains.

--
Fabien Meghazi

Website: http://www.amigrave.com
Email: agr@amigrave.com
IM: amigrave@gmail.com

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Fabien Meghazi (#1)
Re: information_schema.columns.character_octet_length unavailable if no access to pg_database

Fabien Meghazi <amigrave@gmail.com> writes:

On any database, when the pg_database access is restraint for standard
users:
psql> REVOKE ALL ON pg_database FROM public;
it not possible anymore to query the field character_octet_length from the
view information_schema.columns:

It's pretty hard to get excited about that --- it seems like it's going
to be about the least of your problems, if you start revoking public read
permissions on random system catalogs. Postgres isn't really designed
with that sort of change in mind.

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