Re: UNION in a VIEW?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Gordon A(dot) Runkle" <gar(at)integrated-dynamics(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: UNION in a VIEW?
Date: 2001-04-04 22:13:21
Message-ID: 12713.986422401@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"Gordon A. Runkle" <gar(at)integrated-dynamics(dot)com> 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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Edipo Elder Fernandes de Melo 2001-04-04 22:15:44 Re: Memory and performance
Previous Message Phuong Ma 2001-04-04 22:12:27 performance inconsistency