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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Andrus Moor" <eetasoft(at)online(dot)ee>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: CREATE TEMP TABLE AS ... ON COMMIT DROP fails
Date: 2005-11-06 22:36:35
Message-ID: 7591.1131316595@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Andrus Moor" <eetasoft(at)online(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Chris 2005-11-06 22:54:15 Re: How to create a virtual column
Previous Message Rick 2005-11-06 21:33:19 Re: CREATE TEMP TABLE AS ... ON COMMIT DROP fails