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

2005-03-17 Thread Manfred Koizar
On Fri, 11 Mar 2005 10:37:13 +1300, Mark Kirkwood <[EMAIL PROTECTED]> wrote: >Firebird 1.5.1 FreeBSD 5.3 >[correct results] Interbase 6.0: SQL> create table tab (col integer); SQL> select 1 from tab having 1=0; SQL> select 1 from tab having 1=1; 0<---:-)

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

2005-03-13 Thread Zeugswetter Andreas DAZ SD
> What that means is that neither the HAVING clause nor the targetlist > can use any ungrouped columns except within aggregate calls; that is, > > select col from tab having 2>1 Informix: select tabname from systables having 2 > 1; 294: The column (tabname) must be in the GROUP BY list.

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

2005-03-13 Thread Kevin HaleBoyes
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-c

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

2005-03-13 Thread Barry Lind
On Oracle 9.2 you get 0, 0, 0, and 2 rows. --Barry SQL> create table tab (col integer); Table created. SQL> select 1 from tab having 1=0; no rows selected SQL> select 1 from tab having 1=1; no rows selected SQL> insert into tab values (1); 1 row created. SQL> insert into tab values (2);

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

2005-03-13 Thread johnnnnnn
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 -

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

2005-03-13 Thread Mark Kirkwood
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-c

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

2005-03-13 Thread Heikki Linnakangas
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;

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

2005-03-10 Thread Tom Lane
"Barry Lind" <[EMAIL PROTECTED]> writes: > On Oracle 9.2 you get 0, 0, 0, and 2 rows. Really!? Well, we always knew they were a bit standards-challenged ;-). I have more faith in DB2 being an accurate implementation of the spec. regards, tom lane

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

2005-03-10 Thread Mark Shewmaker
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

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

2005-03-10 Thread Michael Fuhr
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;

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

2005-03-10 Thread Gary Doades
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-c

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

2005-03-10 Thread Gill, Jerry T.
, 2005 11:45 AM To: pgsql-hackers@postgresql.org; pgsql-bugs@postgresql.org Subject: Re: [BUGS] [HACKERS] We are not following the spec for HAVING without GROUP BY I wrote: > This is quite clear that the output of a HAVING clause is a "grouped > table" no matter whether the query

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

2005-03-10 Thread Tom Lane
I wrote: > This is quite clear that the output of a HAVING clause is a "grouped > table" no matter whether the query uses GROUP BY or aggregates or not. > What that means is that neither the HAVING clause nor the targetlist > can use any ungrouped columns except within aggregate calls; that is, >