Re: CREATE TEMP TABLE AS ... ON COMMIT DROP fails

Поиск
Список
Период
Сортировка
От ellis@spinics.net (Rick)
Тема Re: CREATE TEMP TABLE AS ... ON COMMIT DROP fails
Дата
Msg-id 1131312799.334735@localhost.localdomain
обсуждение исходный текст
Ответ на CREATE TEMP TABLE AS ... ON COMMIT DROP fails  ("Andrus Moor" <eetasoft@online.ee>)
Список pgsql-general
In article <dklr9g$781$2@news.hub.org>, Andrus Moor <eetasoft@online.ee> wrote:
>I need to create temporary table with data which is dropped at end of
>transaction.
>
>CREATE TABLE t1 ( c1 INTEGER ) ;
>INSERT INTO t1 VALUES (1);
>CREATE TEMP TABLE t2 AS SELECT * FROM t1 ON COMMIT DROP;
>
>Causes ERROR:  syntax error at or near "ON" at character 104
>
>How to implement this ?

You can't just explicitly drop the table just before the commit?

--
http://yosemitenews.info/

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

Предыдущее
От: "Andrus Moor"
Дата:
Сообщение: CREATE TEMP TABLE AS ... ON COMMIT DROP fails
Следующее
От: Bob Pawley
Дата:
Сообщение: Subqueries