Re: [HACKERS] Phantom row from aggregate in self-join in 6.5 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Phantom row from aggregate in self-join in 6.5
Date
Msg-id 1281.932769853@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Phantom row from aggregate in self-join in 6.5  (Thomas Lockhart <lockhart@alumni.caltech.edu>)
List pgsql-hackers
Thomas Lockhart <lockhart@alumni.caltech.edu> writes:
>> IIRC, you were the main advocate of the position that the code's
>> existing behavior is correct.  Does that mean I can go change it? ;-)

> Yes, after you slap me around a bit for being so wrong. Do you
> remember when we were discussing it? I want to go back and see why I
> thought this was right. I'm guessing that the example was not phrased
> in exactly this way, and that there may be some other behavior we need
> to maintain. (Otherwise, I might have used up my "one wrong idea per
> year" ;)

Actually, it may be my recollection that's wrong.  The only discussion
of the point that I can find right now is the thread "SUM() and GROUP
BY" from around 1/12/99 in pghackers, and it seems to be mostly focused
on arguments about whether you should get NULL or 0 from a no-input
SUM...

I would've sworn I remember a couple of other related threads in the
past year or so, but I cannot find them now.

Anyway, unless someone speaks up in favor of the way the code currently
works, I will see about changing the results for the GROUP-BY-with-no-
input-rows case.  I got a few other things to do first though.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] RE: [INTERFACES] Re: SSL patch
Next
From: Mark Hollomon
Date:
Subject: plperl intial pass