Re: Grant Select privileges for all tables in schema

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: zeus(at)ix(dot)netcom(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Grant Select privileges for all tables in schema
Date: 2004-07-07 17:01:12
Message-ID: 20040707170112.GA21390@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Jul 06, 2004 at 15:44:01 -0700,
zeus(at)ix(dot)netcom(dot)com wrote:
> Hi there,
>
> I am using Postgresql 7.3 and I want to grant select rights to a user on all tables in a schema, including those that may be created in the future but whose names are not yet known. I want to do something like:
>
> GRANT SELECT ON <schema>.* TO <user>;
>
> but select isn't a valid privilege on a schema and I don't see how wildcards are supported. Is there a way to do this, or does a table need to exist before a user can be granted rights to it, and users must be explicitly granted rights to each table and not in a 'global' way. I would appreciate any thoughts on this.

You will need to grant select access to tables and sequences individually
after they are created. You might also consider using groups so that you
can more easily add and remove user access.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Keith C. Perry 2004-07-07 17:04:05 Help with query: indexes on timestamps
Previous Message Anton Nikiforov 2004-07-07 16:40:21 Getting user who fired a trigger