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

Поиск
Список
Период
Сортировка
От D'Arcy" "J.M." Cain
Тема Re: [HACKERS] Phantom row from aggregate in self-join in 6.5
Дата
Msg-id m1180TM-0000bFC@druid.net
обсуждение исходный текст
Ответ на Re: [HACKERS] Phantom row from aggregate in self-join in 6.5  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Thus spake Tom Lane
> IIRC, you were the main advocate of the position that the code's
> existing behavior is correct.  Does that mean I can go change it? ;-)

I vote (again) for yes.  It's so annoying having to add code to test
each returned value against 0 just in case there is only one returned
value that needs to be checked.

"SELECT COUNT(*) FROM table" should always return one row but "SELECT
COUNT(*) FROM table GROUP BY somethng" returns a variable number of
rows anyway so what's the harm in extending "one or more" to "zero
or more" returned rows?  We have to iterate through whatever the
count is anyway in our programs.

-- 
D'Arcy J.M. Cain <darcy@{druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 424 2871     (DoD#0082)    (eNTP)   |  what's for dinner.


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

Предыдущее
От: Oleg Bartunov
Дата:
Сообщение: Re: inserts/updates problem under stressing !
Следующее
От: Philip Warner
Дата:
Сообщение: Re: [HACKERS] RFC: Security and Impersonation