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 200208140523.g7E5NUe01345@candle.pha.pa.us
Whole thread Raw
In response to Re: [HACKERS] CREATE TEMP TABLE .... ON COMMIT  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] CREATE TEMP TABLE .... ON COMMIT  (Gavin Sherry <swm@linuxworld.com.au>)
List pgsql-patches
Gavin, was this addressed?

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

Tom Lane wrote:
> Gavin Sherry <swm@linuxworld.com.au> writes:
> > 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.
>
> Surely it does.
>
>     CREATE TEMP TABLE foo(...) ON COMMIT DELETE ROWS;
>
>     BEGIN;
>     insert some rows in foo;
>     process rows in foo;
>     COMMIT;     -- foo is now empty again
>
>     BEGIN;
>     insert some rows in foo;
>     process rows in foo;
>     COMMIT;     -- foo is now empty again
>
>     repeat until application quit...
>
> What am I missing?
>
>             regards, tom lane
>
> ---------------------------(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: PGPASSWORDFILE env var for libpq
Next
From: Bruce Momjian
Date:
Subject: Re: pg_settings view