"Gordon A. Runkle" <[EMAIL PROTECTED]> writes:
> I have a number of views that I'm bringing over from DB2 which
> have UNIONs in them.  Some of the UNIONs have joins.

> The views are not working as expected (I'm running 7.1RC2).

> It appears that the where clause being applied to the view
> by the user is not being distributed properly to the selects.

You're correct, an outer WHERE clause will not be pushed down into
the member selects of a UNION.  (This hasn't really got anything
to do with whether a VIEW is involved.)  I haven't gotten round to
convincing myself about whether that transformation is always valid,
or what conditions it needs to be valid.  A TODO item for some
future release...

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://www.postgresql.org/search.mpl

Reply via email to