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

From: "Zeugswetter Andreas DAZ SD" <ZeugswetterA(at)spardat(dot)at>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <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 09:17:50
Message-ID: 46C15C39FEB2C44BA555E356FBCD6FA40184D339@m0114.s-mxs.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs 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

Browse pgsql-bugs by date

  From Date Subject
Next Message Henk van den Toorn 2005-03-10 09:38:32 BUG #1533: "*OLD*" relation not recognized in CREATE RULE
Previous Message cathy.hemsley 2005-03-10 08:45:01 Re: R: Fault when return strings over 256 characters in PLpgSQL

Browse pgsql-hackers by date

  From Date Subject
Next Message Milen A. Radev 2005-03-10 09:19:03 Too frequent warnings for wraparound failure
Previous Message Gaetano Mendola 2005-03-10 09:13:34 Re: One vacuum full is not enough.