Re: case sensitive db name?

From: Richard Huxton <dev(at)archonet(dot)com>
To: Thomas Finneid <tfinneid(at)fcon(dot)no>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: case sensitive db name?
Date: 2009-02-04 20:28:23
Message-ID: 4989FA67.4010706@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thomas Finneid wrote:
> I have a case sensitivity problem I dont understand.
>
> On a Solaris 10 with pg 8.2.6 (Sun build) I get problems when I do a
> CREATE DATABASE with a db name with case.
>
> On a Kubuntu machine with pg 8.2.7 it is not a problem.
>
> More specifically the problem arises after the CREATE DATABASE, it
> occurs when I try to connect to the newly created database.

You are creating one database with its name quoted, or accessing it that
way. PostgreSQL folds identifiers to lower-case unless you quote them,
in which case it leaves them alone.

CREATE DATABASE Test1 => test1
CREATE DATABASE TEST1 => test1
CREATE DATABASE "Test1" => Test1

Oh - most recent 8.2 is 8.2.11. too.

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2009-02-04 21:09:42 Re: Pet Peeves?
Previous Message Dann Corbit 2009-02-04 20:15:20 Re: SELECT on a table with Time values