Re: [BUGS] Strange random() Correlation

2006-05-27 Thread Volkan YAZICI
On May 27 11:50, Tom Lane wrote: > Volkan YAZICI <[EMAIL PROTECTED]> writes: > > ISTM, there's a problem in the correlation of random() to outer JOINs. > > The random() functions are being evaluated more than once because the > subselect gets "flattened" into the outer query, so that you have > th

Re: [BUGS] Strange random() Correlation

2006-05-27 Thread Tom Lane
Volkan YAZICI <[EMAIL PROTECTED]> writes: > ISTM, there's a problem in the correlation of random() to outer JOINs. The random() functions are being evaluated more than once because the subselect gets "flattened" into the outer query, so that you have the equivalent of select random(), ...

[BUGS] Strange random() Correlation

2006-05-27 Thread Volkan YAZICI
Hi, ISTM, there's a problem in the correlation of random() to outer JOINs. Here's a test case: BEGIN; CREATE TEMP TABLE nuc_codes (id serial, code char(1)); COPY nuc_codes (code) FROM stdin; A C D G H K M N R S T U V W X Y \. SELECT id, code FROM nuc_codes; SELECT T1.r1, T1.r2, T2.code, T3.co