Re: Prepare/Execute silently discards prohibited ORDER BY values

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Prepare/Execute silently discards prohibited ORDER BY values
Дата
Msg-id 13099.1431565504@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Prepare/Execute silently discards prohibited ORDER BY values  (Josh Berkus <josh@agliodbs.com>)
Ответы Re: Prepare/Execute silently discards prohibited ORDER BY values  (Pedro Gimeno <pgsql-004@personal.formauri.es>)
Список pgsql-bugs
Josh Berkus <josh@agliodbs.com> writes:
> On 05/11/2015 08:35 PM, Tom Lane wrote:
>> Somewhere along the line we decided that "ORDER BY non-integer-constant"
>> was too close to the boundary line between those two interpretations, so
>> it would be better to reject it and make you use a less ambiguous syntax.

> Well, the fact that:
> ORDER BY 'test'
> ... errrors, whereas
> ORDER BY 'test'::TEXT
> ... does not is a very small POLS violation.

Agreed; I think the reason why we disallow this case is not so much
string literals as numeric literals.  It would be an even bigger POLA
violation if "ORDER BY 1" and "ORDER BY 1.0" were both accepted and did
fundamentally different things.

            regards, tom lane

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

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: Prepare/Execute silently discards prohibited ORDER BY values
Следующее
От: maxim.boguk@gmail.com
Дата:
Сообщение: BUG #13286: Core dumped during pg_terminate_backend call.