Re: role to access all information_schema.*?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ruben Laguna <ruben(dot)laguna(at)gmail(dot)com>
Cc: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: role to access all information_schema.*?
Date: 2025-10-07 21:14:15
Message-ID: 2538615.1759871655@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Ruben Laguna <ruben(dot)laguna(at)gmail(dot)com> writes:
> Do you know what the standard says exactly, does it outright bans using any
> special means like having (pg_metadata_viewr or pg_read_information_schema,
> etc). as "access privilege"? Do you think it's hopeless to propose this in
> pgsql-hackers?

You can propose all you want, but I doubt there will be a lot of
interest in it. In the first place, the pg_read_all_data role
already exists and gets the job done without any arguable violation
of the standard. In the second place, we really don't take that much
interest in the information_schema. It's there for pro-forma spec
compliance, but it performs very poorly (not least because it has to
check the spec-mandated privilege restrictions). Moreover there are
significant aspects of Postgres that simply aren't represented in
the information_schema because they're outside the standard.
So the advice you'll generally get is what Laurenz already said,
namely look directly at the PG catalogs.

That being the case, and since there's a pretty decent argument
that such a role would violate the SQL spec, I doubt it'll happen.

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message André Verwijs 2025-10-07 23:14:30 RE: Postgresql fedora - gpg key(s) not working/found ....
Previous Message Matthew Planchard 2025-10-07 21:00:34 Dropping index from large, partitioned table