Обсуждение: Using EXECUTE in same manner as SELECT

Поиск
Список
Период
Сортировка

Using EXECUTE in same manner as SELECT

От
Andrew Lazarus
Дата:
Is there some clear reason why I can't using EXECUTE of a PREPAREd query
as I can a SELECT statement in CREATE TABLE AS, INSERT, FROM clause,
sub-selects, etc.? If not, wouldn't this be a very useful change? (Or is
there some special syntax to do this that I can't find?)

Andrew Lazarus  andrew@pillette.com

Вложения

Re: Using EXECUTE in same manner as SELECT

От
Neil Conway
Дата:
Andrew Lazarus wrote:
> Is there some clear reason why I can't using EXECUTE of a PREPAREd query
> as I can a SELECT statement in CREATE TABLE AS, INSERT, FROM clause,
> sub-selects, etc.? If not, wouldn't this be a very useful change?

You can already do CREATE TABLE AS ... EXECUTE.

I agree being able to use EXECUTE in more situations would be a good
thing. Patches are welcome.

I'm not sure there's a lot of value in adding support for EXECUTE in
subqueries, since you would still need to do parsing, rewriting and
planning for the rest of the query; also, the fact that the plan for the
EXECUTE has already been generated would limit the optimizer's ability
to pullup subqueries and so forth.

-Neil