grant connect to all databases

From: Matt Zagrabelny <mzagrabe(at)d(dot)umn(dot)edu>
To: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: grant connect to all databases
Date: 2024-10-05 13:44:32
Message-ID: CAOLfK3Vj-PFBJi28y1170ZP3dGeW2qpG_8_9CbaJWvEgXQ8-jQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

I'd like to have a read-only user for all databases.

I found the pg_read_all_data role predefined role, which I granted to my RO
user:

GRANT pg_read_all_data TO ro_user;

...but I cannot connect to my database(s).

I'd like to not have to iterate over all the databases and "GRANT
CONNECT...".

Is there a way to do this with just one GRANT or equivalent command?

Thanks for any help!

-m

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2024-10-05 14:02:43 Re: grant connect to all databases
Previous Message Peter J. Holzer 2024-10-05 09:22:52 Re: Request for Insights on ID Column Migration Approach