Copying data from one table to another

From: Erwin Van de Velde <erwin(dot)vandevelde(at)ua(dot)ac(dot)be>
To: pgsql-general(at)postgresql(dot)org
Subject: Copying data from one table to another
Date: 2004-02-28 16:08:09
Message-ID: 200402281708.09754.erwin.vandevelde@ua.ac.be
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I have to copy data from one table to another, and I was wondering if there is
an easier way to do that than to have a lot of inserts one after another. I
already looked at the copy command, but what I need should happen in my
program itself, while the user is waiting, and it's only a partial copy of
the first table to the second (which has it's own fields, although with
default values to start with). So the copy command didn't seem an easy (or
fast) way to do that. Is there a trick to let the INSERT command take more
than one tuple at once?

Thanks in advance,
Erwin Van de Velde
Student of University of Antwerp,
Belgium

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Björn Lundin 2004-02-28 16:29:51 Re: Copying data from one table to another
Previous Message Tom Lane 2004-02-28 15:57:25 Re: PostgreSQL insert speed tests