CREATE TEMP TABLE .... ON COMMIT

Поиск
Список
Период
Сортировка
От Gavin Sherry
Тема CREATE TEMP TABLE .... ON COMMIT
Дата
Msg-id Pine.LNX.4.21.0208091918180.21494-102000@linuxworld.com.au
обсуждение исходный текст
Ответы Re: [PATCHES] CREATE TEMP TABLE .... ON COMMIT  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Attached is a revised version of my previous

ON COMMIT DROP

patch. This patch implements:

ON COMMIT { DROP | PRESERVE ROWS | DELETE ROWS }

The latter two are SQL99.

Sample usage:
---
template1=# begin;
BEGIN
template1=# create temp table a (a int) on commit drop;
CREATE
template1=# create temp table b (a int) on commit preserve rows;
CREATE
template1=# create temp table c (a int) on commit delete rows;
CREATE
template1=# insert into a values(1);
INSERT 24793 1
template1=# insert into b values(1);
INSERT 24794 1
template1=# insert into c values(1);
INSERT 24795 1
template1=# commit;
COMMIT
template1=# select * from a;
ERROR:  Relation "a" does not exist
template1=# select * from b;
 a
---
 1
(1 row)

template1=# select * from c;
 a
---
(0 rows)

template1=# create temp table a (a int) on commit drop;
ERROR:  You must be inside a transaction to use ON COMMIT

---

Gavin

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Karel Zak
Дата:
Сообщение: Re: Locale number format confusion
Следующее
От: "Nigel J. Andrews"
Дата:
Сообщение: Re: [GENERAL] Linux Largefile Support In Postgresql RPMS