Re: Handling of mutable functions in subqueries? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Handling of mutable functions in subqueries?
Date
Msg-id 13675.1096657752@sss.pgh.pa.us
Whole thread Raw
In response to Handling of mutable functions in subqueries?  (Greg Stark <gsstark@mit.edu>)
List pgsql-hackers
Greg Stark <gsstark@mit.edu> writes:
> Shouldn't Postgres be noticing the non-immutable random() function and not
> making the subquery an InitPlan? 

Perhaps.  In the dim past, using a dummy subquery was the only way to
persuade the planner not to re-evaluate functions that you didn't want
evaluated more than once, so changing this could be expected to break
some existing applications.  Barring some non-invented cases where it
causes problems, I'm inclined to leave it alone.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Darcy Buskermolen
Date:
Subject: Re: AIX and V8 beta 3
Next
From: Gaetano Mendola
Date:
Subject: ERROR: left link changed unexpectedly