Re: Problem with GRANT in 7.4.19

From: "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "Kakoli Sen *EXTERN*" <kakolis(at)cdacb(dot)ernet(dot)in>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Problem with GRANT in 7.4.19
Date: 2008-03-13 10:43:08
Message-ID: D960CB61B694CF459DCFB4B0128514C201E02EFC@exadv11.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Kakoli Sen wrote:
> The command GRANT ALL PRIVILEGES ON DATABASE casDatabase to tester;
> is giving error:
> ERROR: database "casdatabase" does not exist.(Note that the db name in error is all in lower case).
>
> Also \l shows that casDatabase exists.
> Why is 'casDatabase' being changed to 'casdatabase'?

PostgreSQL will convert all names to lower case unless you protect them with
double quotes.

Try:
GRANT ALL PRIVILEGES ON DATABASE "casDatabase" to tester;

Yours,
Laurenz Albe

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Kakoli Sen 2008-03-13 10:52:28 Re: Problem with GRANT in 7.4.19
Previous Message Scott Marlowe 2008-03-13 10:36:24 Re: postgre vs MySQL