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

BUG #2690: GRANT does not allow periods in database or schema names

From: "Nick Johnson" <pgsql(at)spatula(dot)net>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #2690: GRANT does not allow periods in database or schema names
Date: 2006-10-12 17:59:45
Message-ID: 200610121759.k9CHxjrw033661@wwwmaster.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-bugs
The following bug has been logged online:

Bug reference:      2690
Logged by:          Nick Johnson
Email address:      pgsql(at)spatula(dot)net
PostgreSQL version: 8.1.1
Operating system:   FreeBSD 6.1
Description:        GRANT does not allow periods in database or schema names
Details: 

Though you can create a database with a period in the name (e.g.,
"example.com"), you cannot issue a GRANT on that database name from the
command line.

pgsql=# GRANT ALL ON DATABASE example.com TO someuser;
ERROR:  syntax error at or near "." at character 30
LINE 1: GRANT ALL ON DATABASE example.com TO someuser;

The same syntax works okay for databases without a period in the name.

Either GRANT should work on any database name that works when creating a
database, or CREATE should disallow the same things that GRANT disallows.

Responses

pgsql-bugs by date

Next:From: Ille vieljansDate: 2006-10-12 19:08:43
Subject: BUG #2691: Server did not start. Error: Could not create log file.
Previous:From: Peter EisentrautDate: 2006-10-12 17:01:42
Subject: Re: IYYY: unexpected behaviour

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