Re: BUG #3430: Case Sensitive Table Names

From: "Gurjeet Singh" <singh(dot)gurjeet(at)gmail(dot)com>
To: Ashwin <ashwin_poddar(at)persistent(dot)co(dot)in>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #3430: Case Sensitive Table Names
Date: 2007-07-06 08:53:28
Message-ID: 65937bea0707060153n6f15bbebnfa596ab124d9d46e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 7/6/07, Ashwin <ashwin_poddar(at)persistent(dot)co(dot)in> wrote:
>
>
> The following bug has been logged online:
>
> Bug reference: 3430
> Logged by: Ashwin
> Email address: ashwin_poddar(at)persistent(dot)co(dot)in
> PostgreSQL version: 8.2.4
> Operating system: Linux
> Description: Case Sensitive Table Names
> Details:
>
> I have a strange problem,
>
> I have created a Table with name Employee_Master
> when i fire a Query as
> Select * from Employee_Master
> it give me an error as employee_master doesnt Exists.
> but when i rename my table name as employee_master
> the query works fine...
> is that necessary to have table names in small case????

Only if you have quoted the table names while creating them.

For eg, The following two commands will create tables with different names:

create table "Test"( a int );

create table "test"( a int );

create table "TesT"( a int );

Postgres converts all identifiers to lower-case, unless they are quoted.

HTH

--
gurjeet[(dot)singh](at)EnterpriseDB(dot)com
singh(dot)gurjeet(at){ gmail | hotmail | indiatimes | yahoo }.com

EnterpriseDB http://www.enterprisedb.com

17°29'34.37"N 78°30'59.76"E - Hyderabad
18°32'57.25"N 73°56'25.42"E - Pune *

Mail sent from my BlackLaptop device

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Andrew Sullivan 2007-07-06 14:52:43 Re: DB Install Problem
Previous Message Pelle Johansson 2007-07-06 08:44:08 BUG #3431: age() gets the days wrong