Re: Rules and Views - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Rules and Views
Date
Msg-id 13424.1028228380@sss.pgh.pa.us
Whole thread Raw
In response to Re: Rules and Views  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Responses Re: Rules and Views  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List pgsql-hackers
Stephan Szabo <sszabo@megazone23.bigpanda.com> writes:
> So if T1 has a #dups>0 and T2 has a #dups>0 we should get
> no rows, but what if T1' (with the clause) has a #dups>0 but
> T2' has a #dups=0?

Um, you're right --- pushing down into the right-hand side would reduce
N, thereby possibly *increasing* the number of output rows not reducing
it.  My mistake ... should have worked out the EXCEPT case in more
detail.

This says that we can't push down at all in the EXCEPT ALL case, I
think, and I'm leery about whether we should push for EXCEPT.  But
the UNION and INTERSECT cases are probably the important ones anyway.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Marc G. Fournier"
Date:
Subject: Re: Open 7.3 items
Next
From: "Marc G. Fournier"
Date:
Subject: Re: Trim the Fat (Was: Re: Open 7.3 items )