Re: [BUGS] non-deterministic error related to MIN/MAX optimization

2008-09-07 Thread Tom Lane
[ back to this issue ] "Pavel Stehule" <[EMAIL PROTECTED]> writes: > 2008/8/26 Tom Lane <[EMAIL PROTECTED]>: >> Jeff Davis <[EMAIL PROTECTED]> writes: >>> ERROR: set-valued function called in context that cannot accept a set >> >> Hmm ... after a bit of poking at it, the reason it's failing is t

Re: [BUGS] non-deterministic error related to MIN/MAX optimization

2008-08-26 Thread Pavel Stehule
2008/8/26 Tom Lane <[EMAIL PROTECTED]>: > Jeff Davis <[EMAIL PROTECTED]> writes: >> => -- make "foo" into a subquery and add a no-op >> => -- to prevent it from pulling up the subquery >> => select max(a), generate_series(1,2) as g from (select a as a from foo >> offset 0) dummy; >> ERROR: set-val

Re: [BUGS] non-deterministic error related to MIN/MAX optimization

2008-08-26 Thread Tom Lane
Jeff Davis <[EMAIL PROTECTED]> writes: > => -- make "foo" into a subquery and add a no-op > => -- to prevent it from pulling up the subquery > => select max(a), generate_series(1,2) as g from (select a as a from foo > offset 0) dummy; > ERROR: set-valued function called in context that cannot acce

Re: [BUGS] non-deterministic error related to MIN/MAX optimization

2008-08-26 Thread Jeff Davis
On Tue, 2008-08-26 at 01:04 -0400, Tom Lane wrote: > Please provide some more detail about those experiments. The test case > hasn't been seen to fail in the buildfarm, AFAIR. Dan Farina, my colleague at Truviso, was experimenting with some query transformations that pushed the range table entrie

Re: [BUGS] non-deterministic error related to MIN/MAX optimization

2008-08-25 Thread Tom Lane
Jeff Davis <[EMAIL PROTECTED]> writes: > On Mon, 2008-08-25 at 22:26 -0400, Tom Lane wrote: >> ... It's mostly accidental that there are any >> variants that do work, I think. Why would you want a SRF in a sort key? > The following line was added to the regression tests: > aggregates.sql:226: >

Re: [BUGS] non-deterministic error related to MIN/MAX optimization

2008-08-25 Thread Jeff Davis
On Mon, 2008-08-25 at 22:26 -0400, Tom Lane wrote: > Jeff Davis <[EMAIL PROTECTED]> writes: > > => select max(a), generate_series(1,2) as g from foo order by g desc; > > ERROR: set-valued function called in context that cannot accept a set > > This strikes me as a pretty useless query, so the fa

Re: [BUGS] non-deterministic error related to MIN/MAX optimization

2008-08-25 Thread Tom Lane
Jeff Davis <[EMAIL PROTECTED]> writes: > => select max(a), generate_series(1,2) as g from foo order by g desc; > ERROR: set-valued function called in context that cannot accept a set This strikes me as a pretty useless query, so the fact that it doesn't work doesn't bother me. It's mostly accide