Re: [HACKERS] We are not following the spec for HAVING without GROUP BY

johnnnnnn <john@phaedrusdeinus.org>

From: johnnnnnn <john@phaedrusdeinus.org>
To: pgsql-hackers@postgresql.org, pgsql-bugs@postgresql.org, Tom Lane <tgl@sss.pgh.pa.us>
Date: 2005-03-10T20:01:28Z
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:

DB2/LINUX 8.1.6

> create table tab (col integer);
> select 1 from tab having 1=0;

1          
-----------

  0 record(s) selected.


> select 1 from tab having 1=1;

1          
-----------
          1

  1 record(s) selected.


> insert into tab values(1);
> insert into tab values(2);
> select 1 from tab having 1=0;

1          
-----------

  0 record(s) selected.

> select 1 from tab having 1=1;

1          
-----------
          1

  1 record(s) selected.


-johnnnnnnnn