From: | "Gordon A(dot) Runkle" <gar(at)integrated-dynamics(dot)com> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: UNION in a VIEW? |
Date: | 2001-04-04 23:41:26 |
Message-ID: | 9agb3b$v1a$1@news.tht.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
In article <12713(dot)986422401(at)sss(dot)pgh(dot)pa(dot)us>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Gordon A. Runkle | 2001-04-04 23:57:47 | Re: UNION in a VIEW? |
Previous Message | Josh Berkus | 2001-04-04 23:18:30 | Re: UNION in a VIEW? |