Re: [HACKERS] Phantom row from aggregate in self-join in 6.5
Zeugswetter Andreas <andreas.zeugswetter@telecom.at>
From: Zeugswetter Andreas IZ5 <Andreas.Zeugswetter@telecom.at>
To: pgsql-hackers@postgreSQL.org
Date: 1999-07-23T08:17:27Z
Lists: 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