Re: UNION/INTERSECT in subselects

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: UNION/INTERSECT in subselects
Дата
Msg-id 12882.968218035@sss.pgh.pa.us
обсуждение исходный текст
Ответ на UNION/INTERSECT in subselects  (Florent Guillaume <efge@mail.com>)
Список pgsql-hackers
Florent Guillaume <efge@mail.com> writes:
> In the grammar we have :
>   in_expr:  SubSelect | ...
> but SubSelect doesn't allow UNIONs, only select_clause does.

> Could in_expr be changed to use select_clause instead without adverse
> ill effects ?

Unfortunately the problems with union/intersect/except go a lot deeper
than the grammar.  Take a look at the rewriter and the planner, if
you have a strong stomach.  They're just not built to deal with these
constructs except at the top level of a query.  (The executor would
likely work just fine, if only the upstream modules would give it a
valid plan ...)

I'm hoping to see this stuff cleaned up during the much-talked-of
querytree redesign that we plan for the 7.2 cycle.  AFAICS there is
no way to fix it without some pretty serious hacking on the querytree
representation of union etc.
        regards, tom lane


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

Предыдущее
От: Leandro Fanzone
Дата:
Сообщение: Re: RPMs and symlinks (was Re: [NOVICE] C++ library probs)
Следующее
От: "Mike Mascari"
Дата:
Сообщение: Re: Fragged State in 7.0.2