Re: BUG #11596: Duplicate column

Поиск
Список
Период
Сортировка
От Marti Raudsepp
Тема Re: BUG #11596: Duplicate column
Дата
Msg-id CABRT9RD8x4Vj1iOTzSpPFTBEf_p1ngEkaDm1CHASE=8yzdR+Qg@mail.gmail.com
обсуждение исходный текст
Ответ на BUG #11596: Duplicate column  (kotadiyadhrupesh@gmail.com)
Список pgsql-bugs
Hi Dhrupesh,

On Mon, Oct 6, 2014 at 1:58 PM,  <kotadiyadhrupesh@gmail.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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: kotadiyadhrupesh@gmail.com
Дата:
Сообщение: BUG #11596: Duplicate column
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #11595: PostgreSQL applies intermediate configuration files