Re: Volatile functions in subqueries don't prevent subqueries from being evaluated in initplans?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gregory Stark <stark(at)enterprisedb(dot)com>
Cc: Postgres <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Volatile functions in subqueries don't prevent subqueries from being evaluated in initplans?
Date: 2008-08-20 14:23:20
Message-ID: 28874.1219242200@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Gregory Stark <stark(at)enterprisedb(dot)com> writes:
> Hm, shouldn't this query notice that random() is volatile and not make the
> subquery an initplan?

We've never done that in the past; in fact I recall seeing people using
subselects deliberately to hide volatility.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-08-20 14:25:22 Re: make dist does not work in VPATH
Previous Message Tom Lane 2008-08-20 14:18:23 Re: Patch: plan invalidation vs stored procedures