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
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match