Re: UNION in a VIEW?

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: UNION in a VIEW?
Дата
Msg-id web-34027@davinci.ethosmedia.com
обсуждение исходный текст
Ответ на Re: UNION in a VIEW?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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
informationtechnology      josh@agliodbs.com  and data management solutions       (415) 565-7293 for law firms, small
businesses       fax 621-2533   and non-profit organizations.      San Francisco
 


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [7.0.3] optimizing a LIKE query ...
Следующее
От: "Gordon A. Runkle"
Дата:
Сообщение: Re: UNION in a VIEW?