Re: NOT HAVING clause? - Mailing list pgsql-general

From Stephan Szabo
Subject Re: NOT HAVING clause?
Date
Msg-id 20060124072516.B27682@megazone.bigpanda.com
Whole thread Raw
In response to NOT HAVING clause?  (Alban Hertroys <alban@magproductions.nl>)
List pgsql-general
On Tue, 24 Jan 2006, Alban Hertroys wrote:

> This is sort of a feature request, I suppose. I solved my problem, but
> "NOT HAVING" seems to match better with the desired result or the way
> you phrase the question in your mind, if that makes any sense...

One problem is that HAVING really works on entire groups at a time
(including aggregated data for the group) not on pieces of the group.

However, I think one might be able to fake it with an array accumulating
aggregate like the one from
http://www.postgresql.org/docs/current/static/xaggr.html

and a query like:

SELECT object_id FROM image GROUP BY object_id HAVING
NOT(1 = ANY(array_accum(sort_order))).

pgsql-general by date:

Previous
From: Jimmy Rowe
Date:
Subject:
Next
From: "Gevik"
Date:
Subject: Re: user defined function