Re: Rules and Views - Mailing list pgsql-hackers

From Hannu Krosing
Subject Re: Rules and Views
Date
Msg-id 1028210325.12593.5.camel@taru.tm.ee
Whole thread Raw
In response to Re: Rules and Views  (Curt Sampson <cjs@cynic.net>)
Responses Re: Rules and Views  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List pgsql-hackers
On Thu, 2002-08-01 at 12:29, Curt Sampson wrote:
> On Thu, 1 Aug 2002, Zeugswetter Andreas SB SD wrote:
> 
> > I had a "union all" view, which is actually a quite different animal than
> > a "union" view which needs to eliminate duplicates before further processing.
> 
> I had the same problem with UNION ALL.
>

Could someone give an example where it is not safe to push the WHERE
clause down to individual parts of UNION (or UNION ALL) wher these parts
are simple (non-aggregate) queries?

I can see that it has to be made into HAVING in subquery if UNION's
subqueries are aggregate (GROUP BY) queries, but can anyone give an
example where the meaning of the query changes for non-aggregate
subqueries.

---------------
Hannu


pgsql-hackers by date:

Previous
From: Curt Sampson
Date:
Subject: Re: Rules and Views
Next
From: "Marc G. Fournier"
Date:
Subject: cvs checkout pgsql