This is a discussion on BUG #2690: GRANT does not allow periods in database or schema names within the pgsql Bugs forums, part of the PostgreSQL category; --> The following bug has been logged online: Bug reference: 2690 Logged by: Nick Johnson Email address: pgsql@spatula.net PostgreSQL version: ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| The following bug has been logged online: Bug reference: 2690 Logged by: Nick Johnson Email address: pgsql@spatula.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. ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq |
| |||
| Nick Johnson wrote: > > The following bug has been logged online: > > Bug reference: 2690 > Logged by: Nick Johnson > Email address: pgsql@spatula.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. Sure you can. Just quote the name: GRANT ALL ON DATABASE "example.com" TO someuser; -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend |
| |||
| Nick Johnson wrote: > 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 You are making the faulty assumption that example.com and "example.com" are the same thing. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend |
| ||||
| "Nick Johnson" <pgsql@spatula.net> writes: > 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. You need some double quotes: http://www.postgresql.org/docs/8.1/s...AX-IDENTIFIERS This is by no means unique to GRANT, nor to database names. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org |
| Thread Tools | |
| Display Modes | |
|
|