471,108 Members | 1,327 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,108 software developers and data experts.

Using EXECUTE in same manner as SELECT

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 an****@pillette.com
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 23 '05 #1
1 2431
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

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Barn Yard | last post: by
18 posts views Thread by Darryl Kerkeslager | last post: by
1 post views Thread by Nick | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.