Re: We are not following the spec for HAVING without GROUP BY - Mailing list pgsql-hackers

From Zeugswetter Andreas DAZ SD
Subject Re: We are not following the spec for HAVING without GROUP BY
Date
Msg-id 46C15C39FEB2C44BA555E356FBCD6FA40184D339@m0114.s-mxs.net
Whole thread Raw
In response to We are not following the spec for HAVING without GROUP BY  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> 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.
select tabname from systables group by 1 having 2 > 1;  all rows returned
select tabname from systables group by 1 having 1 > 2;  no rows found

Andreas


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: NIST Test Suite
Next
From: Laszlo Hornyak
Date:
Subject: Re: Runtime accepting build discrepancies