Re: Bug? Function with side effects not evaluated in CTE - Mailing list pgsql-general

From David Johnston
Subject Re: Bug? Function with side effects not evaluated in CTE
Date
Msg-id 1382378464609-5775292.post@n5.nabble.com
Whole thread Raw
In response to Re: Bug? Function with side effects not evaluated in CTE  (Merlin Moncure <mmoncure@gmail.com>)
List pgsql-general
Merlin Moncure-2 wrote
> Any reliance on that behavior would be wrong because it's expressly
> contraindicated by the documentation.

That makes no practical difference since the decision to make the function
volatile is not conscious due to it being the default; and the current
behavior hides the fact that what they are doing is unsupported since they
do nothing special to invoke the optimization. The people likely to be hit
by this are those with the least experience and so in making the change,
which I do support, communication of the behavior difference needs to be
done in such a way as to reasonably reach and gain understanding from these
people.

That aside, I'm not coming up with any standard idioms that would benefit
from this optimization so the scope of the problem may very well be small
enough to just bite the bullet and deal with regression complaints as they
are voiced.

David J.





--
View this message in context:
http://postgresql.1045698.n5.nabble.com/Bug-Function-with-side-effects-not-evaluated-in-CTE-tp5774792p5775292.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


pgsql-general by date:

Previous
From: Joe Van Dyk
Date:
Subject: Report the trigger name when complaining about "tuple to be updated was already modified by an operation triggered by the current command"?
Next
From: John R Pierce
Date:
Subject: Re: Upgrade from 9.1 to 9.10