Re: Odd error when using UNION and COLLATE

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Odd error when using UNION and COLLATE
Дата
Msg-id 28684.1469052188@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Odd error when using UNION and COLLATE  (Greg Stark <stark@mit.edu>)
Ответы Re: Odd error when using UNION and COLLATE  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
Greg Stark <stark@mit.edu> writes:
> But I think I agree that it's surprising that the collate clause isn't
> working in the ORDER BY on a column produced by a UNION. Certainly
> that's where people usually want to put it.

See this ancient comment in transformSetOperationStmt:
    * For now, we don't support resjunk sort clauses on the output of a    * setOperation tree --- you can only use the
SQL92-specoptions of    * selecting an output column by name or number.  Enforce by checking that    *
transformSortClausedoesn't add any items to tlist.
 

Perhaps sometime we ought to make an effort to relax that.
        regards, tom lane



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

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: Odd error when using UNION and COLLATE
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Odd error when using UNION and COLLATE