pg.ddx.io  pgsql-testers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Trying to GRANT privileges on a newly-created database
2+ messages / 2 participants
[nested] [flat]

* Trying to GRANT privileges on a newly-created database
@ 2010-05-02 22:59  Lou Picciano <loupicciano@comcast.net>
  0 siblings, 1 reply; 2+ messages in thread

From: Lou Picciano @ 2010-05-02 22:59 UTC (permalink / raw)
  To: pgsql-testers



[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: relation "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. 

[Comments]: We've seen that users have this problem with mixed-case object names, and must use quotes. Our example names have always been in lowercase - have not bee rename, and we've tried commands both without tnd with quotes! Have we somehow corrupted this cluster? Am seeing other strange behavior related to simple commands. 

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Trying to GRANT privileges on a newly-created database
@ 2010-05-03 02:00  Josh Berkus <josh@agliodbs.com>
  parent: Lou Picciano <loupicciano@comcast.net>
  0 siblings, 0 replies; 2+ messages in thread

From: Josh Berkus @ 2010-05-03 02:00 UTC (permalink / raw)
  To: 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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2010-05-03 02:00 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-05-02 22:59 Trying to GRANT privileges on a newly-created database Lou Picciano <loupicciano@comcast.net>
2010-05-03 02:00 ` Josh Berkus <josh@agliodbs.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox