[lug] postgres question

Hugh Brown hugh at math.byu.edu
Thu Nov 13 07:51:43 MST 2003


On Thu, 2003-11-13 at 08:51, rm at fabula.de wrote:
> On Thu, Nov 13, 2003 at 08:09:59AM -0500, Hugh Brown wrote:
> > [...]
> > is tedious.  I falsely assumed that 
> > 
> > GRANT { { CREATE | TEMPORARY | TEMP } [,...] | ALL .....
> > 
> > meant that I could do a grant on DATABASE dbname and have all
> > tables,views,sequences, etc. automatically get their privileges
> > updated.  Postgres is version 7.3.2 (built from the redhat rpms for rh9
> > I believe).
> 
> 
> Yes, that's a nasty bit of postgres' security implementation.
> An, unfortunately, it's not possible to replace the relation
> name with a subquery (the query parser will grok on "GRANT ALL 
> ON (SELECT relname FROM pg_class ...").
> 
> Tell me if you find a workarround, i was bitten by that myself
> a few times.
> 
>   Ralf Mattes

For now my workaround is

postgres: createuser foo
postgres: createdb foodb
postgres: grant all on database foodb to foo
foo: \i db-dump

Hugh




More information about the LUG mailing list