Re: [HACKERS] CREATE TEMP TABLE .... ON COMMIT

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>
Cc: pgsql-hackers(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org
Subject: Re: [HACKERS] CREATE TEMP TABLE .... ON COMMIT
Date: 2002-08-10 05:16:20
Message-ID: 21071.1028956580@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Gavin Sherry <swm(at)linuxworld(dot)com(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Kirkwood 2002-08-10 05:25:25 Re: [HACKERS] Linux Largefile Support In Postgresql RPMS
Previous Message Mark Kirkwood 2002-08-10 05:13:23 Re: [HACKERS] Linux Largefile Support In Postgresql RPMS

Browse pgsql-patches by date

  From Date Subject
Next Message Tatsuo Ishii 2002-08-10 06:51:26 Re: [GENERAL] workaround for lack of REPLACE() function
Previous Message Tom Lane 2002-08-10 05:13:37 Re: adding PGPASSWORDFILE to libpq