dbTalk Databases Forums  

[BUGS] BUG #2051: CREATE TEMP TABLE AS SELECT doesn't play nice with ON COMMIT DROP

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #2051: CREATE TEMP TABLE AS SELECT doesn't play nice with ON COMMIT DROP in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
David Fetter
 
Posts: n/a

Default [BUGS] BUG #2051: CREATE TEMP TABLE AS SELECT doesn't play nice with ON COMMIT DROP - 11-17-2005 , 07:32 PM







The following bug has been logged online:

Bug reference: 2051
Logged by: David Fetter
Email address: david (AT) fetter (DOT) org
PostgreSQL version: 8.0x
Operating system: Linux
Description: CREATE TEMP TABLE AS SELECT doesn't play nice with ON
COMMIT DROP
Details:

CREATE TEMP TABLE foo
AS SELECT a,b,c
FROM bar
ON COMMIT DROP;

causes a syntax error. So does

CREATE TEMP TABLE foo
ON COMMIT DROP
AS SELECT a,b,c
FROM bar
;

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly

Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] BUG #2051: CREATE TEMP TABLE AS SELECT doesn't play nice with ON COMMIT DROP - 11-17-2005 , 07:37 PM






David Fetter <david (AT) fetter (DOT) org> writes:
Quote:
On Thu, Nov 17, 2005 at 04:37:14PM -0500, Tom Lane wrote:
CREATE TEMP TABLE foo ... ON COMMIT DROP;

It's that first little elipsis mark that's the problem. Is there
something really clever I've been missing on how to do a dynamic table
creation?
Oh, you're worried about what to do if you don't know the output column
set of the query? OK, that is a bit harder, but I think it's still a
corner case. How much are you really going to get done with the table
if you don't know what columns it has?

regards, tom lane

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


Reply With Quote
  #3  
Old   
David Fetter
 
Posts: n/a

Default Re: [BUGS] BUG #2051: CREATE TEMP TABLE AS SELECT doesn't play nice with ON COMMIT DROP - 11-22-2005 , 05:35 PM



On Tue, Nov 22, 2005 at 06:20:37PM -0500, Bruce Momjian wrote:
Quote:
TODO has:

o Add ON COMMIT capability to CREATE TABLE AS ... SELECT
Great

Cheers,
D
--
David Fetter david (AT) fetter (DOT) org http://fetter.org/
phone: +1 415 235 3778

Remember to vote!

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, 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.