Re: SELECT INTO and ON COMMIT

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Yves Dorfsman <yves(at)zioup(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: SELECT INTO and ON COMMIT
Date: 2015-05-13 23:38:29
Message-ID: 20150513233829.GD31547@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, May 13, 2015 at 05:29:36PM -0600, Yves Dorfsman wrote:
>
> Is there any way to add an ON COMMIT clause to a SELECT INTO TEMP TABLE?

Well CREATE TABLE has a ON COMMIT { PRESERVE ROWS | DELETE ROWS | DROP }
clause, but I don't see it in SELECT INTO, so it seems you have to
create the temp table using CREATE TABLE, then INSERT ... SELECT.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2015-05-13 23:56:20 Re: SELECT INTO and ON COMMIT
Previous Message Yves Dorfsman 2015-05-13 23:29:36 SELECT INTO and ON COMMIT