Re: HAVING <alias> ...

From: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: HAVING <alias> ...
Date: 2005-04-20 15:10:41
Message-ID: 20050420121008.Y76866@ganymede.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 20 Apr 2005, Tom Lane wrote:

> "Marc G. Fournier" <scrappy(at)postgresql(dot)org> writes:
>> Is there a reason (other then it hasn't been implemented yet?) that the
>> following couldn't work?
>
>> SELECT id,count(id) AS cnt
>> FROM table
>> WHERE id IN ( 1,2,3,4,5)
>> GROUP BY id
>> HAVING cnt = 2;
>
> It's contrary to the SQL spec, for one thing ...

Of course it is *sigh*

Thanks ...

----
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email: scrappy(at)hub(dot)org Yahoo!: yscrappy ICQ: 7615664

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruno Wolff III 2005-04-20 15:18:10 Re: inet increment w/ int8
Previous Message Tom Lane 2005-04-20 14:41:46 Re: Foreign keys on array elements