COPY from temp table to main table insted of INSERT INTO

From: Stephen Froehlich <s(dot)froehlich(at)cablelabs(dot)com>
To: "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: COPY from temp table to main table insted of INSERT INTO
Date: 2017-07-11 16:45:54
Message-ID: DM5PR06MB2891AE381C635F8453F80193E5AE0@DM5PR06MB2891.namprd06.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

I tend to do mass inserts to my database, but INSERT INTO is taking quite a while for 100k values.

What is the syntax for using the COPY command to copy a well formatted temp table to the "end" of the primary table? I am having trouble understanding https://www.postgresql.org/docs/9.5/static/sql-copy.html.

Thanks,
Stephen

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message David G. Johnston 2017-07-11 16:59:40 Re: COPY from temp table to main table insted of INSERT INTO
Previous Message Ed Behn 2017-07-05 12:18:45 Re: where and how to store calculated data?