From: | Mark Shewmaker <mark(at)primefactor(dot)com> |
---|---|
To: | 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 BY |
Date: | 2005-03-10 22:42:07 |
Message-ID: | 20050310224207.GB20501@primefactor.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
On Thu, Mar 10, 2005 at 12:44:50PM -0500, 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.
Sybase ASE version 12.5.2 returns 0, 0, 0, and 1 rows.
A plain "select 1 from tab" returns zero rows when tab is empty.
--
Mark Shewmaker
mark(at)primefactor(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2005-03-10 23:09:30 | Re: [HACKERS] We are not following the spec for HAVING without GROUP BY |
Previous Message | Mark Kirkwood | 2005-03-10 21:37:13 | Re: [HACKERS] We are not following the spec for HAVING without GROUP |
From | Date | Subject | |
---|---|---|---|
Next Message | Nicolai Tufar | 2005-03-10 22:43:48 | Re: [pgsql-hackers-win32] snprintf causes regression tests |
Previous Message | Mark Kirkwood | 2005-03-10 21:37:13 | Re: [HACKERS] We are not following the spec for HAVING without GROUP |