dbTalk Databases Forums  

Re: [BUGS] CREATE TEMP TABLE t1 ON COMMIT AS SELECT TRUE::BOOL LIMIT

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


Discuss Re: [BUGS] CREATE TEMP TABLE t1 ON COMMIT AS SELECT TRUE::BOOL LIMIT in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Bruce Momjian
 
Posts: n/a

Default Re: [BUGS] CREATE TEMP TABLE t1 ON COMMIT AS SELECT TRUE::BOOL LIMIT - 06-08-2004 , 10:29 PM






Sean Chittenden wrote:
Quote:
In a follow up to my post from two days ago about creating TEMP TABLES,
I noticed what I think is kind of a glaring omission: CREATE TEMP TABLE
AS doesn't support ON COMMIT. Nothing Earth shattering, but it did
catch me by surprise. There's also no ALTER TABLE statement that I can
issue to tweak a TEMP table to have it include ON COMMIT behavior after
its been created. If this isn't low hanging fruit, can someone add it
to the TODO list? -sc


-- This works
CREATE TEMP TABLE t1 AS SELECT TRUE::BOOL LIMIT 0;

-- This does not
CREATE TEMP TABLE t1 ON COMMIT DROP AS SELECT TRUE::BOOL LIMIT 0;
The problem is that CREATE TABLE ... AS SELECT is actually SELECT INTO
internally, and SELECT doesn't have any on commit behavior.

Added to TODO:

* Add ON COMMIT capability to CREATE TABLE AS SELECT

--
Bruce Momjian | http://candle.pha.pa.us
pgman (AT) candle (DOT) pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html


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.