pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
information_schema.columns.character_octet_length unavailable if no access to pg_database
2+ messages / 2 participants
[nested] [flat]

* information_schema.columns.character_octet_length unavailable if no access to pg_database
@ 2017-08-03 08:21 Fabien Meghazi <amigrave@gmail.com>
  2017-08-03 13:53 ` Re: information_schema.columns.character_octet_length unavailable if no access to pg_database Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: Fabien Meghazi @ 2017-08-03 08:21 UTC (permalink / raw)
  To: 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@amigrave.com
IM: amigrave@gmail.com

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

* Re: information_schema.columns.character_octet_length unavailable if no access to pg_database
  2017-08-03 08:21 information_schema.columns.character_octet_length unavailable if no access to pg_database Fabien Meghazi <amigrave@gmail.com>
@ 2017-08-03 13:53 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2017-08-03 13:53 UTC (permalink / raw)
  To: Fabien Meghazi <amigrave@gmail.com>; +Cc: pgsql-bugs

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



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


end of thread, other threads:[~2017-08-03 13:53 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-08-03 08:21 information_schema.columns.character_octet_length unavailable if no access to pg_database Fabien Meghazi <amigrave@gmail.com>
2017-08-03 13:53 ` 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