Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-hackers by date

Next:From: Vince VielhaberDate: 2001-10-30 15:12:39
Subject: Re: pgsql-committers?
Previous:From: Marc G. FournierDate: 2001-10-30 14:27:35
Subject: Re: pgsql-committers?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group