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 20:05:04
Message-ID: 2151.1004472304@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Okay, I'm convinced: the problem is that the test for ungrouped vars
> used inside subselects is too simplistic.

Not only was that true, but the handling of GROUP BY expressions was
pretty grotty in general: they'd be re-evaluated at multiple levels of
the resulting plan tree. Which is not too bad for "GROUP BY a+b",
but it's unpleasant when a complex subselect is involved.

I've committed fixes to CVS.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Doug McNaught 2001-10-30 20:07:41 Re: Performance problems???
Previous Message Marc G. Fournier 2001-10-30 18:58:01 Postings from Bruce and Olivier rejected ...