Re: [HACKERS] CREATE TEMP TABLE .... ON COMMIT - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: [HACKERS] CREATE TEMP TABLE .... ON COMMIT
Date
Msg-id 200208270429.g7R4TZq14356@candle.pha.pa.us
Whole thread Raw
In response to Re: CREATE TEMP TABLE .... ON COMMIT  (Gavin Sherry <swm@linuxworld.com.au>)
Responses Re: [HACKERS] CREATE TEMP TABLE .... ON COMMIT
Re: [HACKERS] CREATE TEMP TABLE .... ON COMMIT
List pgsql-patches
Gavin, how are you doing with this.  As I remember, the only remaining
issue was where to store the 'drop on commit' information in the
backend.  If that is all there is, we can come up with a solution.

---------------------------------------------------------------------------

Gavin Sherry wrote:
> On Fri, 9 Aug 2002, Tom Lane wrote:
>
> > Gavin Sherry <swm@linuxworld.com.au> writes:
> > > template1=# create temp table a (a int) on commit drop;
> > > ERROR:  You must be inside a transaction to use ON COMMIT
> >
> > Surely that's only for ON COMMIT DROP, if you intend to offer the
> > others?
>
> I should have provided details of this in the email. SQL99 details the
> baviour as follows:
>
> If TEMPORARY is specified and ON COMMIT is omitted, then ON COMMIT
> DELETE ROWS is implicit
>
> This might give users a bit of a surprise so the effective behaviour is ON
> COMMIT PRESERVE ROWS.
>
> As for your question (and, perhaps, SQL99) I don't seen how it makes any
> sense to specify ON COMMIT outside of a transaction block.
>
> >
> >             regards, tom lane
> >
>
> Gavin
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.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

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: pg_locks cleanup
Next
From: Gavin Sherry
Date:
Subject: Re: [HACKERS] CREATE TEMP TABLE .... ON COMMIT