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

From Tom Lane
Subject Re: [HACKERS] CREATE TEMP TABLE .... ON COMMIT
Date
Msg-id 21071.1028956580@sss.pgh.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
List pgsql-patches
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

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: adding PGPASSWORDFILE to libpq
Next
From: Bruce Momjian
Date:
Subject: Re: small psql patch - show Schema name for \dt \dv \dS