How to GRANT SELECT on all tables? - Mailing list pgsql-novice

From
Subject How to GRANT SELECT on all tables?
Date
Msg-id 200601312110.k0VLAls24255@panix3.panix.com
Whole thread Raw
Responses Re: How to GRANT SELECT on all tables?  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: How to GRANT SELECT on all tables?  ("Kevin Crenshaw" <kcrenshaw@viscient.com>)
Re: How to GRANT SELECT on all tables?  (Christoph Della Valle <christoph.dellavalle@goetheanum.ch>)
List pgsql-novice



Another noobish question.

I'm looking for the "moral equivalent" of the mythical

  GRANT SELECT ON TABLE * TO PUBLIC

I.e. I'm looking for a way to grant SELECT privileges to PUBLIC on all
the tables, without having to specify all the table names.

Naively, I tried the subquery approach

  GRANT SELECT
    ON TABLE (SELECT tablename FROM pg_tables WHERE schemaname='public')
    TO PUBLIC

but this failed too.

Thanks!

kj


pgsql-novice by date:

Previous
From: Darren R
Date:
Subject: subscribe-digest
Next
From: Tom Lane
Date:
Subject: Re: How to GRANT SELECT on all tables?