pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: hubert depesz lubaczewski <depesz@depesz.com>
To: celati Laurent <laurent.celati@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Grant select for all tables of the 12 schemas of my one db ?
Date: Wed, 13 Oct 2021 11:52:15 +0200
Message-ID: <20211013095214.GA17654@depesz.com> (raw)
In-Reply-To: <CAHByMH1agdweY=x_NptB5ka2t6Sa6YOXY-2JfHr9Zbdwj-GS1Q@mail.gmail.com>
References: <CAHByMH1agdweY=x_NptB5ka2t6Sa6YOXY-2JfHr9Zbdwj-GS1Q@mail.gmail.com>

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





view thread (5+ messages)  latest in thread

Message-ID: <20211013095214.GA17654@depesz.com>
Permalink:  ../20211013095214.GA17654@depesz.com/
Also on:    postgresql.org/message-id/20211013095214.GA17654@depesz.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: depesz@depesz.com, laurent.celati@gmail.com
  Subject: Re: Grant select for all tables of the 12 schemas of my one db ?
  In-Reply-To: <20211013095214.GA17654@depesz.com>
  References: <CAHByMH1agdweY=x_NptB5ka2t6Sa6YOXY-2JfHr9Zbdwj-GS1Q@mail.gmail.com> <20211013095214.GA17654@depesz.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox