Re: BUG #11596: Duplicate column

From: Marti Raudsepp <marti(at)juffo(dot)org>
To: kotadiyadhrupesh(at)gmail(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #11596: Duplicate column
Date: 2014-10-06 17:09:43
Message-ID: CABRT9RD8x4Vj1iOTzSpPFTBEf_p1ngEkaDm1CHASE=8yzdR+Qg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi Dhrupesh,

On Mon, Oct 6, 2014 at 1:58 PM, <kotadiyadhrupesh(at)gmail(dot)com> wrote:
> I have one table which have two field
> one is id and other is ID.
> When i featch id then it return always id's
> data.

This is not a bug. Identifiers in the SQL language are
case-insensitive, id and ID refer to the exact same column. In
PostgreSQL's case they are both converted to lower case.

If you want to use uppercase identifiers, you have to quote them using
double quotes:
select id, "ID" from table;

In general, PostgreSQL community discourages using uppercase letters
anywhere in identifiers.

Regards,
Marti

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2014-10-06 19:13:04 Re: BUG #11595: PostgreSQL applies intermediate configuration files
Previous Message kotadiyadhrupesh 2014-10-06 10:58:45 BUG #11596: Duplicate column