Thread: Grant select on all tables in a schema

Grant select on all tables in a schema

From
"Bob Hockney"
Date:
Hi there,

I am using Postgresql 7.3 and I want to grant select rights to a user to all tables in a
schema, even those tables that might be created in the future and whose names are
not yet known, without needing to explicitly grant select rights for each table.  Is this
possible, or does a table need to exist before I can grant a user rights to it?

What I want to do is something like this:

GRANT SELECT ON <schema>.* TO user;

But SELECT isn't valid for schemas.  Any thoughts on how to accomplish this
appreciated.  I am not subscribed to the list so please cc me on replies.

-Bob