information_schema.columns.character_octet_length unavailable if no access to pg_database

From: Fabien Meghazi <amigrave(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: information_schema.columns.character_octet_length unavailable if no access to pg_database
Date: 2017-08-03 08:21:13
Message-ID: CAMEsWemTUzS8ukvK1aZJpK_pqS3VS0PoddwHHSejWmC5eNL0Cw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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(at)amigrave(dot)com
IM: amigrave(at)gmail(dot)com

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Krystian Szladewski 2017-08-03 12:35:57 "could not open relation with OID XXX" when using recreated index in sql function
Previous Message Ashesh Vashi 2017-08-03 07:11:09 Re: pgAdmin 4 issues