Re: We are not following the spec for HAVING without GROUP

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: We are not following the spec for HAVING without GROUP
Дата
Msg-id Pine.OSF.4.61.0503111018210.164442@kosh.hut.fi
обсуждение исходный текст
Ответ на Re: We are not following the spec for HAVING without GROUP BY  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Thu, 10 Mar 2005, Tom Lane wrote:

> Would those of you with access to other DBMSes try this:
>
> create table tab (col integer);
> select 1 from tab having 1=0;
> select 1 from tab having 1=1;
> insert into tab values(1);
> insert into tab values(2);
> select 1 from tab having 1=0;
> select 1 from tab having 1=1;
>
> I claim that a SQL-conformant database will return 0, 1, 0, and 1 rows
> from the 4 selects --- that is, the contents of tab make no difference
> at all.  (MySQL returns 0, 0, 0, and 2 rows, so they are definitely
> copying our mistake...)

DB2 (version 8.1) gives 0, 1, 0, 1.

- Heikki


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

Предыдущее
От: Laszlo Hornyak
Дата:
Сообщение: Re: Runtime accepting build discrepancies
Следующее
От: Thomas Hallgren
Дата:
Сообщение: Re: Runtime accepting build discrepancies