Re: BUG #2051: CREATE TEMP TABLE AS SELECT doesn't play nice with ON COMMIT DROP - Mailing list pgsql-bugs

From David Fetter
Subject Re: BUG #2051: CREATE TEMP TABLE AS SELECT doesn't play nice with ON COMMIT DROP
Date
Msg-id 20051117210749.GB9407@fetter.org
Whole thread Raw
In response to Re: BUG #2051: CREATE TEMP TABLE AS SELECT doesn't play nice with ON COMMIT DROP  (Jaime Casanova <systemguards@gmail.com>)
Responses Re: BUG #2051: CREATE TEMP TABLE AS SELECT doesn't play nice with ON COMMIT DROP  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: BUG #2051: CREATE TEMP TABLE AS SELECT doesn't play  (Neil Conway <neilc@samurai.com>)
List pgsql-bugs
On Thu, Nov 17, 2005 at 03:26:21PM -0500, Jaime Casanova wrote:
> On 11/17/05, David Fetter <david@fetter.org> wrote:
> >
> > The following bug has been logged online:
> >
> > Bug reference:      2051
> > Logged by:          David Fetter
> > Email address:      david@fetter.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
> > ;
>
> That is because there isn't an ON COMMIT clause for CREATE TABLE AS
>
> see compatibility section in:
> http://www.postgresql.org/docs/8.1/static/sql-createtableas.html

This is still a bug, or at least a big gotcha.

Cheers,
D
--
David Fetter david@fetter.org http://fetter.org/
phone: +1 510 893 6100   mobile: +1 415 235 3778

Remember to vote!

pgsql-bugs by date:

Previous
From: Jaime Casanova
Date:
Subject: Re: BUG #2051: CREATE TEMP TABLE AS SELECT doesn't play nice with ON COMMIT DROP
Next
From: Tom Lane
Date:
Subject: Re: BUG #2051: CREATE TEMP TABLE AS SELECT doesn't play nice with ON COMMIT DROP