create temp table .. on commit delete rows

From: Teodor Sigaev <teodor(at)sigaev(dot)ru>
To: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: create temp table .. on commit delete rows
Date: 2006-10-12 11:34:29
Message-ID: 452E2845.6040901@sigaev.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

1)
# create temp table a ( a int ) without oids on commit delete rows;
# insert into a values(1);
# begin;
# insert into a values(2);
# commit;
# select * from a;
a
---
(0 rows)

2)
# insert into a values(1);
# begin;
# insert into a values(2);
# rollback;
# select * from a;
a
---
(0 rows)

It seems to me that 1) is good, but 2) makes some strange, unpredictable result...

--
Teodor Sigaev E-mail: teodor(at)sigaev(dot)ru
WWW: http://www.sigaev.ru/

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2006-10-12 11:44:12 Re: create temp table .. on commit delete rows
Previous Message Andrew Sullivan 2006-10-12 11:26:47 Hints (Was: Index Tuning Features)