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

Re: Trying to GRANT privileges on a newly-created database

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: pgsql-testers(at)postgresql(dot)org
Subject: Re: Trying to GRANT privileges on a newly-created database
Date: 2010-05-03 02:00:33
Message-ID: 4BDE2E41.5090505@agliodbs.com (view raw or flat)
Thread:
Lists: pgsql-testers
On 05/02/2010 03:59 PM, Lou Picciano wrote:
>
>
> *[TEST REPORT]*
>
> *[Release]:* 8.5alpha2
>
> *[Test Type]:* psql CLI
>
> *[Test]:* Trying to GRANT privileges on a newly-created database
>
> *[Platform]:* Solaris SPARC 4u (E450)
>
> *[Parameters]:* Trying to GRANT privileges on a newly-created database.
> db name in lower case.
>
> *[Failure]: yes*
>
> *[Results]:*
>
> # CREATE DATABASE dbname;
>
> # GRANT ALL ON dbname TO role;
>
> ERROR: relatioypn "dbname" does not exist
>
> Please note this database is created in lower case; it has not been
> renamed from upper.
>
> # GRANT ALL ON dbname TO role; - produces the same error.
	
In general, to do a grant on anything other that a table you need to 
name the object type, i.e.

GRANT ALL ON DATABASE dbname TO role;

That's been true for quite a while.

-- 
                                   -- Josh Berkus
                                      PostgreSQL Experts Inc.
                                      http://www.pgexperts.com

In response to

pgsql-testers by date

Next:From: Adam RauchDate: 2010-05-04 17:39:40
Subject: [TEST REPORT] JDBC reports invalid primary key meta data after PK column rename
Previous:From: Lou PiccianoDate: 2010-05-02 22:59:35
Subject: Trying to GRANT privileges on a newly-created database

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