Re: [HACKERS] Phantom row from aggregate in self-join in 6.5
| От | Thomas Lockhart |
|---|---|
| Тема | Re: [HACKERS] Phantom row from aggregate in self-join in 6.5 |
| Дата | |
| Msg-id | 3797E290.4B8E0ABD@alumni.caltech.edu обсуждение исходный текст |
| Ответ на | Re: [HACKERS] Phantom row from aggregate in self-join in 6.5 (Tom Lane <tgl@sss.pgh.pa.us>) |
| Ответы |
Re: [HACKERS] Phantom row from aggregate in self-join in 6.5
|
| Список | pgsql-hackers |
> > create table foo (a int);
> > select t1.a, count(*) from foo t1, foo t2 group by t1.a;
> > I get
> > a|count
> > -+-----
> > | 0
> > (1 row)
> > instead of zero rows.
> It's not a bug, it's a feature ... or at least there are some around
> here who claim that the behavior is OK. I think they're wrong, but
> if you want it changed you'll need to cite chapter and verse from the
> SQL92 standard, not just assert that Informix does it differently.
I don't recall which way I argued before (in fact, I don't recall this
particular example), but I do remember arguing (with righteous
conviction) that the query
select count(*) from foo;
should return a single row containing a zero value. Did we infer from
that some behavior for "group by" (I can't recall any)? istm, at least
today, that the behavior for the group-by is wrong, but we'd better
not change the behavior of my example query...
- Thomas
--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California
В списке pgsql-hackers по дате отправления: