Re: [HACKERS] CREATE TABLE AS ... EXECUTE

2003-06-27 Thread Tom Lane
Alvaro Herrera Munoz [EMAIL PROTECTED] writes:
 Is there a way to create a table from a prepared statement?  CREATE TABLE AS
 explicitly says you have to use a SELECT statement, and the SELECT INTO
 syntax doesn't seem to allow the use of a prepared statement either.

IIRC there is an EXECUTE INTO.

regards, tom lane

---(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


Re: [HACKERS] CREATE TABLE AS ... EXECUTE

2003-06-27 Thread Peter Eisentraut
Alvaro Herrera Munoz writes:

 Is there a way to create a table from a prepared statement?  CREATE TABLE AS
 explicitly says you have to use a SELECT statement, and the SELECT INTO
 syntax doesn't seem to allow the use of a prepared statement either.  I
 don't see a way to use the prepared statement as a function nor as a table
 (SELECT ... FROM EXECUTE)

There's EXECUTE INTO, but when I find time I will change it to CREATE
TABLE AS ... EXECUTE, because we don't really like SELECT INTO, so EXECUTE
INTO doesn't seem the right solution.

-- 
Peter Eisentraut   [EMAIL PROTECTED]


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster