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

From Tom Lane
Subject Re: CREATE TEMP TABLE AS ... ON COMMIT DROP fails
Date
Msg-id 7591.1131316595@sss.pgh.pa.us
Whole thread Raw
In response to CREATE TEMP TABLE AS ... ON COMMIT DROP fails  ("Andrus Moor" <eetasoft@online.ee>)
List pgsql-general
"Andrus Moor" <eetasoft@online.ee> writes:
> CREATE TEMP TABLE t2 AS SELECT * FROM t1 ON COMMIT DROP;
> Causes ERROR:  syntax error at or near "ON" at character 104

Not implemented, as the manual clearly states.

> How to implement this ?

Create the temp table with a plain CREATE, then fill it with
INSERT ... SELECT.

            regards, tom lane

pgsql-general by date:

Previous
From: Bob Pawley
Date:
Subject: Subqueries
Next
From: Chris
Date:
Subject: Re: How to create a virtual column