Re: BUG #6774: FOR IN SELECT LOOP ignores ORDER BY

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #6774: FOR IN SELECT LOOP ignores ORDER BY
Дата
Msg-id 1186.1343666173@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #6774: FOR IN SELECT LOOP ignores ORDER BY  (Jan Wieck <JanWieck@Yahoo.com>)
Список pgsql-bugs
Jan Wieck <JanWieck@Yahoo.com> writes:
> Note that PL/pgSQL replaces all local variables inside a query with
> $-parameters for the prepared SPI plan. The parser rejects ordering by
> non-integer constants, but it does not reject ordering by $-parameters
> or constant expressions. (maybe it should).

The only real reason it complains about simple constants is that
otherwise people might think "ORDER BY 1" means something different
than what it does mean according to SQL92.  Otherwise, if you want
to sort by a constant, who are we to stop you?

            regards, tom lane

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

Предыдущее
От: Jan Wieck
Дата:
Сообщение: Re: BUG #6774: FOR IN SELECT LOOP ignores ORDER BY
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: BUG #6751: usage flaws in pg_restore