dbTalk Databases Forums  

Using EXECUTE in same manner as SELECT

comp.databases.postgresql.general comp.databases.postgresql.general


Discuss Using EXECUTE in same manner as SELECT in the comp.databases.postgresql.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Andrew Lazarus
 
Posts: n/a

Default Using EXECUTE in same manner as SELECT - 11-05-2004 , 10:50 AM






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 (AT) pillette (DOT) com


---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings


Reply With Quote
  #2  
Old   
Neil Conway
 
Posts: n/a

Default Re: Using EXECUTE in same manner as SELECT - 11-05-2004 , 10:59 PM






Andrew Lazarus wrote:
Quote:
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



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.