Re: Grant select for all tables of the 12 schemas of my one db ?

From: hubert depesz lubaczewski <depesz(at)depesz(dot)com>
To: celati Laurent <laurent(dot)celati(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Grant select for all tables of the 12 schemas of my one db ?
Date: 2021-10-13 09:52:15
Message-ID: 20211013095214.GA17654@depesz.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Vijaykumar Jain 2021-10-13 10:03:20 Re: Grant select for all tables of the 12 schemas of my one db ?
Previous Message Metin Ulusinan 2021-10-13 09:38:59 Re: Fault with initcap