[lug] postgres question

dan radom dan at radom.org
Thu Nov 13 08:02:51 MST 2003


* Hugh Brown (hugh at math.byu.edu) wrote:
> 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
> 

from the postgres interactive documentation...

The
"grant all on database mydb to myuser" syntax doesn't work, however the
help above says it to work.
I can't imagine, that if I would like to grant full access over a
complete DB to a new user, then I have to do it from table-to-table and
seq-to-seq...

perhaps this will be addressed in 7.4, which is currently in RC2.  I've
heard very nice things about it, and would love to upgrade to experience
the reported 100-150 % speed increase, but i'll be waiting for the 7.4
release.  i've had to do enough initdb's between rc's and releases to
want to wait for 7.4 final.

mmmm postgres!



More information about the LUG mailing list