From: Gordon A. Runkle <gar@integrated-dynamics.com>
To: pgsql-sql@postgresql.org
Subject: Re: UNION in a VIEW?
Date: Wed, 04 Apr 2001 19:41:26 -0400
Message-ID: <9agb3b$v1a$1@news.tht.net> (raw)
References: <12713.986422401@sss.pgh.pa.us>
In article <12713.986422401@sss.pgh.pa.us>, "Tom Lane" <tgl@sss.pgh.pa.us>
wrote:
> 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...
Thanks, Tom. Not the answer I was hoping for...
This seems to really reduce the utility of UNIONs, especially
within VIEWS.
What DB2 and SQL Server appear to be doing is binding the WHERE
clause to the colums in the positions corresponding to the column
labels in the first select. So long as that is communicated to
the user, I would think that it would be valid. At the very least,
it would be consistent with the other major RDBMSs.
I suppose it's to late to put this in for 7.1... ;-)
Gordon.
--
It doesn't get any easier, you just go faster.
-- Greg LeMond
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: gar@integrated-dynamics.com
Subject: Re: UNION in a VIEW?
In-Reply-To: <9agb3b$v1a$1@news.tht.net>
References: <12713.986422401@sss.pgh.pa.us> <9agb3b$v1a$1@news.tht.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox