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

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: non-deterministic error related to MIN/MAX optimization
Date: 2008-08-26 17:38:24
Message-ID: 1219772304.6213.238.camel@dell.linuxdev.us.dell.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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 entries down into a
subquery.

You can see the effect here:

=> select max(a), generate_series(1,2) as g from foo;
max | g
-----+---
| 1
| 2
(2 rows)

=> -- 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 accept a set

So, although Dan's transformations were semantically correct, they ended
up causing this regression failure.

It doesn't have anything to do with the ORDER BY, so that part of my
example was unnecessary.

Regards,
Jeff Davis

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2008-08-26 18:19:58 Re: non-deterministic error related to MIN/MAX optimization
Previous Message Tom Lane 2008-08-26 16:50:29 Re: BUG #4281: some types of errors do not log statements