On Mon, Jan 22, 2018 at 9:16 AM, Tom Lane <tgl@xxxxxxxxxxxxx> wrote:
Olleg Samoylov <splarv@xxxxx> writes:
> Looked like random() is "volatile", but in subselect it works like "stable".
The point here is that that's an uncorrelated subselect --- ie, it
contains no outer references --- so it need not be, and is not,
re-evaluated at every outer row.
That seems rather circular. Why shouldn't a volatile be honored as volatile just because it is in an uncorrelated sub-select?
Cheers,
Jeff