Re: Unquoted column names fold to lower case

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Unquoted column names fold to lower case
Дата
Msg-id 24100.1372880857@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Unquoted column names fold to lower case  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: Unquoted column names fold to lower case  (Bruce Momjian <bruce@momjian.us>)
Re: Unquoted column names fold to lower case  (Dev Kumkar <devdas.kumkar@gmail.com>)
Список pgsql-sql
Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> Dev Kumkar escribi�:
>> But what I am asking here is if an alias name is provided be it upper case,
>> lower case, or a mix then shouldn't it be preserved as as it is given. All
>> this talk is when alias names are unquoted, when quoted then its standard
>> behavior as seen in other databases.

> Aliases are treated just like any other identifier.  The downcasing
> happens in the lexer (src/backend/parser/scan.l), which is totally
> unaware of the context in which this is happening; so there's no way to
> tweak the downcasing behavior for only aliases and not other
> identifiers.

Quite aside from implementation difficulty, restricting the change to
just column aliases doesn't make it more palatable.  You'd entirely lose
the argument that the change increases spec compliance, because the spec
is perfectly clear that a column alias is an identifier just like any
other.  And you'd still be paying a large part of the application
breakage costs, because the identifiers coming back in query descriptors
are one of the main ways applications would notice such a change.
        regards, tom lane



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

Предыдущее
От: Dev Kumkar
Дата:
Сообщение: Re: Unquoted column names fold to lower case
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Unquoted column names fold to lower case