From: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgresql(dot)org, pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: [HACKERS] We are not following the spec for HAVING without GROUP |
Date: | 2005-03-11 08:20:00 |
Message-ID: | Pine.OSF.4.61.0503111018210.164442@kosh.hut.fi |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs 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
From | Date | Subject | |
---|---|---|---|
Next Message | Miguel Juan | 2005-03-11 09:13:27 | BUG #1535: ODBC bug in pgslqodbc-08_00_0101 |
Previous Message | Tom Lane | 2005-03-11 06:48:47 | Re: BUG #1528: Rows returned that should be excluded by WHERE clause |
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Hallgren | 2005-03-11 09:53:54 | Re: Runtime accepting build discrepancies |
Previous Message | Laszlo Hornyak | 2005-03-11 08:05:45 | Re: Runtime accepting build discrepancies |