Re: Seemingly inconsistent ORDER BY behavior

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Seemingly inconsistent ORDER BY behavior
Дата
Msg-id 14022.1376511138@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Seemingly inconsistent ORDER BY behavior  (Richard Hipp <drh@sqlite.org>)
Ответы Re: Seemingly inconsistent ORDER BY behavior  (BladeOfLight16 <bladeoflight16@gmail.com>)
Список pgsql-general
Richard Hipp <drh@sqlite.org> writes:
> Just to be clear, you intend that a COLLATE clause in the ORDER BY is
> treated as an expression, right?

Yeah, that is the current behavior, although I think that it probably fell
out rather than being consciously thought about.  Arguably it's the wrong
thing, because it looks to me like SQL92 allowed

       select ... order by 1 collate "something"

which our current code will interpret as ordering by a constant (and then
complain that you can't collate an int...).  Don't know if it's worth
changing --- we have our own backwards-compatibility concerns to think
about, and there haven't been any field complaints about this.  I doubt
there's any pressure at this point to become more compatible with SQL92,
as opposed to more compatible with later editions.

            regards, tom lane


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

Предыдущее
От: rob stone
Дата:
Сообщение: Re: Seemingly inconsistent ORDER BY behavior
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Getting list of supported types in Postgres