AW: [HACKERS] Release 6.4

Поиск
Список
Период
Сортировка
От Andreas Zeugswetter
Тема AW: [HACKERS] Release 6.4
Дата
Msg-id 01BDD83B.98976290@zeugswettera.user.lan.at
обсуждение исходный текст
Список 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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: The Hermit Hacker
Дата:
Сообщение: Re: [HACKERS] Re: hackers-digest V1 #954
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] questionable code in heap_formtuple()]