CREATE TEMP TABLE AS ... ON COMMIT DROP fails - Mailing list pgsql-general

From Andrus Moor
Subject CREATE TEMP TABLE AS ... ON COMMIT DROP fails
Date
Msg-id dklr9g$781$2@news.hub.org
Whole thread Raw
Responses Re: CREATE TEMP TABLE AS ... ON COMMIT DROP fails
List pgsql-general
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 ?

Andrus.



pgsql-general by date:

Previous
From: "Andrus Moor"
Date:
Subject: Best way to use indexes for partial match at beginning
Next
From: ellis@spinics.net (Rick)
Date:
Subject: Re: CREATE TEMP TABLE AS ... ON COMMIT DROP fails