Re: UNION in a VIEW?

Поиск
Список
Период
Сортировка
От Gordon A. Runkle
Тема Re: UNION in a VIEW?
Дата
Msg-id 9agb3b$v1a$1@news.tht.net
обсуждение исходный текст
Ответ на Re: UNION in a VIEW?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
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


В списке pgsql-sql по дате отправления:

Предыдущее
От: "Josh Berkus"
Дата:
Сообщение: Re: UNION in a VIEW?
Следующее
От: "Gerald Gutierrez"
Дата:
Сообщение: RE: RE: serial type; race conditions