Skip site navigation (1) Skip section navigation (2)

How do I grant access to entire database at once(schemas,tables,sequences,...)?

From: Ulrich Meis <kenobi(at)halifax(dot)rwth-aachen(dot)de>
To: pgsql-admin(at)postgresql(dot)org
Subject: How do I grant access to entire database at once(schemas,tables,sequences,...)?
Date: 2004-05-17 16:53:58
Message-ID: 40A8EE26.70405@halifax.rwth-aachen.de (view raw or flat)
Thread:
Lists: pgsql-admin
Hi !

I administrate a development server for a little team, and people want
to be able to grant access to an entire database to other
developers/freelancers.

Up till now, I see two possibilities :

1. Write a script that queries the postgres internal tables for all
tables,schemas,sequences,views,functions,... and then executes grant
statements for each one of them. This would have to be repeated each 
time a new object is created.

2.(Not sure if this works) Insert a trigger on postgres's internal
tables in template1 that grants permission to a group, say 
<dbname>_group, to the created object. Developers that need access to 
the database can then be added to that group.

Both solutions require a serious amount of work compared to the simple task.
Is there a simpler or better way to do this?

Thanks for any ideas and comments!

greetings,

Uli




pgsql-admin by date

Next:From: Peter EisentrautDate: 2004-05-17 19:10:08
Subject: Re: How do I grant access to entire database at once(schemas,tables,sequences,...)?
Previous:From: Lamar OwenDate: 2004-05-17 16:00:47
Subject: Re: Installing PostgreSQL on Fedora from RPM

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group