Re: UNION in a VIEW?

From: "Josh Berkus" <josh(at)agliodbs(dot)com>
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 23:18:30
Message-ID: web-34027@davinci.ethosmedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Tom, Gordon,

> 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...

Hmmm ... I'm pretty used an external WHERE clause being applied to the
output of the view, rather than pushed down into the member selects of
the UNION, in the same way as if the UNION query were a subselect.
Coming from a SQL Server background, I'd actually find the suggested
behavior rather confusing (as well as tough for you guys to implement).

-Josh

______AGLIO DATABASE SOLUTIONS___________________________
Josh Berkus
Complete information technology josh(at)agliodbs(dot)com
and data management solutions (415) 565-7293
for law firms, small businesses fax 621-2533
and non-profit organizations. San Francisco

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Gordon A. Runkle 2001-04-04 23:41:26 Re: UNION in a VIEW?
Previous Message Josh Berkus 2001-04-04 23:07:23 Re: Need to do an ALTER TABLE.