From: | Andreas Zeugswetter <andreas(dot)zeugswetter(at)telecom(dot)at> |
---|---|
To: | Jan Wieck <jwieck(at)debis(dot)com> |
Cc: | The Hermit Hacker <scrappy(at)hub(dot)org>, "maillist(at)candle(dot)pha(dot)pa(dot)us" <maillist(at)candle(dot)pha(dot)pa(dot)us>, "hackers(at)postgreSQL(dot)org" <hackers(at)postgreSQL(dot)org> |
Subject: | AW: [HACKERS] Release 6.4 |
Date: | 1998-09-04 17:32:29 |
Message-ID: | 01BDD83B.98976290@zeugswettera.user.lan.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
>In your example:
>
> SELECT x.a, x.b, count(y.a) FROM t1 x, t2 y
> WHERE x.a = y.a GROUP BY x.a, x.b;
>
>Are you suggesting that if there are rows in t1 that are not in t2, that the
>count could/should be zero?
Nooooooo, the count can only be 0 if you do an outer join in this example, like:
SELECT x.a, x.b, count(y.a) FROM t1 x, outer t2 y
WHERE x.a = y.a GROUP BY x.a, x.b;
Otherwise rows with count of zero are eliminated. This is correct behavior.
Andreas
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 1998-09-04 17:51:13 | Re: [HACKERS] questionable code in heap_formtuple()] |
Previous Message | The Hermit Hacker | 1998-09-04 17:12:36 | Re: [HACKERS] Re: hackers-digest V1 #954 |