Re: prevent users from SELECT-ing from pg_roles/pg_database - Mailing list pgsql-general

From Andreas Joseph Krogh
Subject Re: prevent users from SELECT-ing from pg_roles/pg_database
Date
Msg-id VisenaEmail.88.6cc49db915a0e43f.18fbdcf4e42@origo-test01.app.internal.visena.net
Whole thread Raw
In response to Re: prevent users from SELECT-ing from pg_roles/pg_database  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
På tirsdag 28. mai 2024 kl. 01:48:17, skrev Tom Lane <tgl@sss.pgh.pa.us>:
Laurenz Albe <laurenz.albe@cybertec.at> writes:
> On Mon, 2024-05-27 at 09:33 +0200, Andreas Joseph Krogh wrote:
>> I tried:
>>    REVOKE SELECT ON pg_catalog.pg_database FROM public;
>> But that doesn't prevent a normal user from querying pg_database it seems…

> It works here.

Works for me too, although you'd have to do it over in each
database where you want it to be effective.  (Although
pg_database is a shared catalog, the metadata about it
is not shared.)

regards, tom lane

 

Ah, that's what I was missing. Thanks for pointing that out, it's working as expected now.

 

--
Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
 
Attachment

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: prevent users from SELECT-ing from pg_roles/pg_database
Next
From: Alexander Staubo
Date:
Subject: Use of inefficient index in the presence of dead tuples