convert an Insert Into... select from... to use COPY ?

From: Kevin Kempter <kevink(at)consistentstate(dot)com>
To: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: convert an Insert Into... select from... to use COPY ?
Date: 2009-07-16 20:14:52
Message-ID: 200907161414.52918.kevink@consistentstate.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi All;

I have an sql stmt that runs:

insert into x
( a.col1, a.col2, a.col3,b.col1,b.col2)
select blah,blah,blah
...
from giant_table a,
even_bigger_table b
where.....

I wonder, could I convert this to use COPY into the table (x) instead of the
select stmt?

Thanks in advance

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Kevin Grittner 2009-07-16 21:07:09 Re: Flush Shared Buffer Cache
Previous Message Jan-Peter Seifert 2009-07-16 20:07:59 Re: initdb --encoding=LATIN1 fails on Windows