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

From Zeugswetter Andreas IZ5
Subject Re: [HACKERS] Phantom row from aggregate in self-join in 6.5
Date
Msg-id 219F68D65015D011A8E000006F8590C60339E087@sdexcsrv1.f000.d0188.sd.spardat.at
Whole thread Raw
List pgsql-hackers
> >     select t1.a, count(*) from foo t1, foo t2 group by t1.a;
> 
> Still, I must say that a row returning "0" in response to a 
> count(*) isn't at all suprising, I guess it's a matter of 
> whether or not the count(*) or the specific column being
> extracted determines the behavior.
> 
The reason this should intuitively return no rows is the group by clause.
The group by is supposed to give 1 row per group. Since there is no
group, there should be no rows returned.

Andreas


pgsql-hackers by date:

Previous
From: Thomas Lockhart
Date:
Subject: Re: [HACKERS] RFC: remote tables feature
Next
From: "F.J.Cuberos"
Date:
Subject: