From: | Gavin Sherry <swm(at)linuxworld(dot)com(dot)au> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org |
Subject: | Re: CREATE TEMP TABLE .... ON COMMIT |
Date: | 2002-08-09 23:17:36 |
Message-ID: | Pine.LNX.4.21.0208100902100.10901-100000@linuxworld.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
On Fri, 9 Aug 2002, Tom Lane wrote:
> Gavin Sherry <swm(at)linuxworld(dot)com(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Dann Corbit | 2002-08-09 23:18:14 | Re: Proposal: stand-alone composite types |
Previous Message | Joe Conway | 2002-08-09 23:13:30 | Re: Proposal: stand-alone composite types |
From | Date | Subject | |
---|---|---|---|
Next Message | Rod Taylor | 2002-08-09 23:46:28 | Re: Proposal: stand-alone composite types |
Previous Message | Joe Conway | 2002-08-09 23:13:30 | Re: Proposal: stand-alone composite types |