Re: postgres - CASE evaluates subexpression that is not needed to determine the result

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: postgres - CASE evaluates subexpression that is not needed to determine the result
Дата
Msg-id 7647.1541429153@sss.pgh.pa.us
обсуждение исходный текст
Ответ на postgres - CASE evaluates subexpression that is not needed todetermine the result  (Kamenoqd Zelen <kamenoqd@gmail.com>)
Список pgsql-bugs
Kamenoqd Zelen <kamenoqd@gmail.com> writes:
> I have the following 3 examples of case expressions in postgres, which I
> would expect to evaluate in the same way. However the first and the third
> give ERROR: invalid input syntax for integer: "2017.7". The second one
> returns true. Why is the difference?

Constant subexpressions get folded regardless of location.

            regards, tom lane


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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: postgres - CASE evaluates subexpression that is not needed todetermine the result
Следующее
От: Andriy Bartash
Дата:
Сообщение: Update on bug #15468