Re: Grant select for all tables of the 12 schemas of my one db ? - Mailing list pgsql-general

From hubert depesz lubaczewski
Subject Re: Grant select for all tables of the 12 schemas of my one db ?
Date
Msg-id 20211013095214.GA17654@depesz.com
Whole thread Raw
In response to Grant select for all tables of the 12 schemas of my one db ?  (celati Laurent <laurent.celati@gmail.com>)
Responses Re: Grant select for all tables of the 12 schemas of my one db ?
List pgsql-general
On Wed, Oct 13, 2021 at 11:04:42AM +0200, celati Laurent wrote:
> Good morning,
> 
> I work on Postgresql 13 (windows) and Postgis.
> For some "basic USERS", i have to grant select/read for all tables of the
> 12 schemas of my  db ?
> 
> With Postgresql 13, i am obliged to write :
> *GRANT SELECT ON ALL TABLES IN SCHEMA TO username  ?*

Yes. For each schema.

You could write a DO query, or even get psql to run it automaticaly-ish
for every schema, but it will still be separate query for each schema.

depesz



pgsql-general by date:

Previous
From: celati Laurent
Date:
Subject: Grant select for all tables of the 12 schemas of my one db ?
Next
From: Vijaykumar Jain
Date:
Subject: Re: Grant select for all tables of the 12 schemas of my one db ?