469,643 Members | 2,061 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,643 developers. It's quick & easy.

Grant Select privileges for all tables in schema

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.

-Bob

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 23 '05 #1
1 15069
On Tue, Jul 06, 2004 at 15:44:01 -0700,
ze**@ix.netcom.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.

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Amardeep Verma | last post: by
reply views Thread by Charles Cantrell | last post: by
reply views Thread by Charles Cantrell | last post: by
6 posts views Thread by Xerxes | last post: by
6 posts views Thread by Nate Jones via DBMonster.com | last post: by
3 posts views Thread by Chris Ochs | last post: by
6 posts views Thread by john_woo | last post: by
14 posts views Thread by Bob Stearns | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.