Re: [HACKERS] Phantom row from aggregate in self-join in 6.5

From: Zeugswetter Andreas IZ5 <Andreas(dot)Zeugswetter(at)telecom(dot)at>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Phantom row from aggregate in self-join in 6.5
Date: 1999-07-23 08:17:27
Message-ID: 219F68D65015D011A8E000006F8590C60339E087@sdexcsrv1.f000.d0188.sd.spardat.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

Browse pgsql-hackers by date

  From Date Subject
Next Message F.J.Cuberos 1999-07-23 09:11:54
Previous Message Thomas Lockhart 1999-07-23 04:33:28 Re: [PORTS] RedHat6.0 & Alpha