>>>>> "Tom" == Tom Lane <t...@sss.pgh.pa.us> writes:

 >> For bonus weirdness:

 >> select distinct random(),random() from generate_series(1,10);
 >> set enable_hashagg=off;
 >> select distinct random(),random() from generate_series(1,10);

 >> I think _that_ one is a bug.

 Tom> Hmm.  I think the first one is a bug --- the two invocations of
 Tom> random() in the tlist shouldn't be folded together.

That's what I meant.

If you try it using nextval(), you'll notice that the function does
in fact get called twice per row, but one of the results is thrown
away and replaced with the other one.

-- 
Andrew.

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to