Why not sub-selects in targetlists?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Why not sub-selects in targetlists?
Дата
Msg-id 12706.935948875@sss.pgh.pa.us
обсуждение исходный текст
Список pgsql-hackers
For some reason we currently support sub-SELECT expressions only
in WHERE and HAVING clauses, not in the target list of a SELECT.
Does anyone know why this is?

There are a number of places in the planner/optimizer that would need
to be fixed to make it happen, but the changes are utterly trivial
(calling certain transformation routines on the targetlist as well as
for WHERE and HAVING ... probably about a dozen lines total ...).
And a quick look at the executor doesn't show any reason why it would
have a problem, either.  Is there something fundamental that I'm
missing?  If not, why wasn't this done to begin with?
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] PostgreSQL 6.5.2
Следующее
От: The Hermit Hacker
Дата:
Сообщение: Re: [HACKERS] PostgreSQL 6.5.2