Re: Bug? Function with side effects not evaluated in CTE

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: Bug? Function with side effects not evaluated in CTE
Дата
Msg-id CAHyXU0zGADVOVG0GFNpgDXPGsZ2g__tzdAf4X9n580DGGKHAHw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Bug? Function with side effects not evaluated in CTE  (David Johnston <polobo@yahoo.com>)
Ответы Re: Bug? Function with side effects not evaluated in CTE  (David Johnston <polobo@yahoo.com>)
Список pgsql-general
On Fri, Oct 18, 2013 at 8:37 PM, David Johnston <polobo@yahoo.com> wrote:
> Merlin Moncure-2 wrote
>> Regardless, the point at hand is whether specific plan semantics down
>> the chain can control whether or not volatile expressions should run.
>> Clearly, at least to me, they should not.
>
> Put differently ideally this should be put either on the todo list or the
> "we do not want" list and further inquiries can then go to building up
> enough popular demand to convince someone to implement it.  Maybe there
> should be a "convince us" list? Not a todo yet but something still be
> considered.

I would vote it as todo.

> Keeping in mind that there are likely volatile queries relying on the
> current optimization that would become non-optimized and possibly very
> poorly performing.  Since the "fix" for these would be a simple alter
> function to make them stable the cost benefit seems worthwhile - since those
> functions are probably mis-identified in the first place due to the use of
> the default.

Any reliance on that behavior would be wrong because it's expressly
contraindicated by the documentation.  TBH, If it were not
specifically documented that way, I would be considering this to be
bugged behavior.  As for function mis-identification, fair point, but
that's a general problem and not specifically related to CTE
evaluation.

merlin


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

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: [HACKERS] Who is pgFoundery administrator?
Следующее
От: ramistuni
Дата:
Сообщение: Upgrade from 9.1 to 9.10