Gregory Stark <stark@enterprisedb.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