Re: postgres reorders expressions when inlining

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: postgres reorders expressions when inlining
Дата
Msg-id CAKFQuwZCG+pTQmHfQQeiuOLjSKYQt1QH4z2tPLgiyjzF9YcHjg@mail.gmail.com
обсуждение исходный текст
Ответ на postgres reorders expressions when inlining  (Floris Van Nee <florisvannee@Optiver.com>)
Список pgsql-bugs
On Thursday, December 29, 2022, Floris Van Nee <florisvannee@optiver.com> wrote:

Is it expected that Postgres reorders these expressions? I'd think that, even though Postgres decides to inline a query, it should at least evaluate the expressions of the inner-part before the outer part to avoid the division by zero.


Yes, this is working as intended, expression order is not something that is recognized by the system .  In this case protect your division with a case expression.  

 David J.

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

Предыдущее
От: Frank Reppin
Дата:
Сообщение: Re: BUG #17733: ERROR: could not load library "/Users/frank/postgres/postgresql-13.9/lib/postgresql/llvmjit.so": dl
Следующее
От: Tom Lane
Дата:
Сообщение: Re: postgres reorders expressions when inlining