Re: BUG #12603: Results Ordering not correct

Поиск
Список
Период
Сортировка
От David G Johnston
Тема Re: BUG #12603: Results Ordering not correct
Дата
Msg-id 1421774831530-5834765.post@n5.nabble.com
обсуждение исходный текст
Ответ на Re: BUG #12603: Results Ordering not correct  (Guillaume Lelarge <guillaume@lelarge.info>)
Список pgsql-bugs
Guillaume Lelarge-3 wrote
>> SELECT DISTINCT businessunit AS bu_id,
>> '('||businessunit::TEXT||')'||businessunitname as businessunit FROM
> bug_test
>> ORDER BY businessunit;
>
> It is text. You renamed the second column businessunit.

To be more specific, the ORDER BY chooses an output column name before an
input column name.

http://www.postgresql.org/docs/9.1/static/sql-select.html

"Each expression can be the name or ordinal number of an output column
(SELECT list item), or it can be an arbitrary expression formed from
input-column values."

David J.



--
View this message in context:
http://postgresql.nabble.com/BUG-12603-Results-Ordering-not-correct-tp5834749p5834765.html
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.

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

Предыдущее
От: Guillaume Lelarge
Дата:
Сообщение: Re: BUG #12603: Results Ordering not correct
Следующее
От: Asif Naeem
Дата:
Сообщение: Re: pg_upgrade failure on Windows Server