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 04:49:45
Message-ID: 1219726185.8211.11.camel@jdavis
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, 2008-08-25 at 22:26 -0400, Tom Lane wrote:
> Jeff Davis <pgsql(at)j-davis(dot)com> 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 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:
select max(unique2), generate_series(1,3) as g from tenk1 order by g
desc;

I have no argument with what you say above. But one of my colleagues at
Truviso was doing some experiments, and it was causing a regression
failure here. I should have been more clear.

So if it truly is a useless query, shouldn't we at least remove the
regression test?

Regards,
Jeff Davis

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2008-08-26 05:04:44 Re: non-deterministic error related to MIN/MAX optimization
Previous Message Tom Lane 2008-08-26 03:27:40 Re: BUG #4374: pg_restore does not restore public schema comment