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

Re: Database Grants Bug

From: Joe Conway <mail(at)joeconway(dot)com>
To: Marcus England <marcus(dot)england(at)noaa(dot)gov>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Database Grants Bug
Date: 2003-08-18 04:48:07
Message-ID: 3F405A87.3080605@joeconway.com (view raw or flat)
Thread:
Lists: pgsql-bugs
Marcus England wrote:
> Grants do not work at the database level using the syntax mentioned in
> the documentation. i.e.:
> 
> GRANT ALL ON DATABASE dbname TO GROUP groupname;
> 
> Or
> 
> GRANT ALL ON DATABASE dbname TO username;
> 

Works here:

regression=# select version();
                              version
-----------------------------------------------------------------
  PostgreSQL 7.3.3 on i686-redhat-linux-gnu, compiled by GCC 2.96
(1 row)

regression=# GRANT ALL ON DATABASE regression TO GROUP grp1;
GRANT
regression=# GRANT ALL ON DATABASE regression TO user1;
GRANT

You need to be more specific in what you mean by "do not work". Do you 
get an error? What exactly is not working?

Perhaps you expect more than you should -- re-read the docs, 
specifically the section quoted here:

  GRANT { { CREATE | TEMPORARY | TEMP } [,...] | ALL [ PRIVILEGES ] }
      ON DATABASE dbname [, ...]
      TO { username | GROUP groupname | PUBLIC } [, ...]

In the context of DATABASE, ALL means "CREATE & TEMPORARY & TEMP", 
nothing more, nothing less. Further reading provides:

CREATE
     For databases, allows new schemas to be created within the database.

TEMPORARY
TEMP
     Allows temporary tables to be created while using the database.

Are these not working?

HTH,

Joe


In response to

Responses

pgsql-bugs by date

Next:From: Philipp ReisnerDate: 2003-08-18 11:04:58
Subject: Deadlock in PostgreSQL 7.3.4
Previous:From: Marcus EnglandDate: 2003-08-18 04:23:29
Subject: Database Grants Bug

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