From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Matt Zagrabelny <mzagrabe(at)d(dot)umn(dot)edu> |
Cc: | "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: grant connect to all databases |
Date: | 2024-10-05 14:02:43 |
Message-ID: | CAKFQuwYG8uQhN50MgcF1seg8+dwvgTMFez=wA3Rg2rosob78cg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Saturday, October 5, 2024, Matt Zagrabelny <mzagrabe(at)d(dot)umn(dot)edu> wrote:
> 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?
>
The pseudo-role Public exists for just this kind of thing. In fact, in a
default installation it already is given connect privileges on all
databases created by the bootstrap superuser.
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Matt Zagrabelny | 2024-10-05 14:13:59 | Re: grant connect to all databases |
Previous Message | Matt Zagrabelny | 2024-10-05 13:44:32 | grant connect to all databases |