Re: Odd error in complex query (7.2): Sub-SELECT uses un-GROUPed...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Odd error in complex query (7.2): Sub-SELECT uses un-GROUPed...
Date: 2001-10-30 15:01:55
Message-ID: 20490.1004454115@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Philip Warner <pjw(at)rhyme(dot)com(dot)au> writes:
> Select
> case when Exists(Select * From lkp where lkp.f1 = t1.f1) then
> 'known'
> else
> 'unknown'
> end as status,
> sum(x)
> from t1
> group by 1;

Okay, I'm convinced: the problem is that the test for ungrouped vars
used inside subselects is too simplistic. I think it's failing to
consider that if the whole subselect can be considered a grouped
expression, we shouldn't object to ungrouped individual vars within it.
Will work on it.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Vince Vielhaber 2001-10-30 15:12:39 Re: pgsql-committers?
Previous Message Marc G. Fournier 2001-10-30 14:27:35 Re: pgsql-committers?