Skip site navigation (1) Skip section navigation (2)

Re: Copy data from table to table

From: Frank Bax <fbax(at)sympatico(dot)ca>
To: "PostgreSQL Novice" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Copy data from table to table
Date: 2005-04-27 13:51:19
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
At 09:16 AM 4/27/05, Keith Worthington wrote:

>Hi All,
>I can not think of a way to copy data directly betweeen two tables.
>I can only think of two ways to copy the data indirectly.
>Method 1:  Write a function that loops through the results of a select query
>running individual inserts for each record.
>Method 2:  Use SELECT INTO to put the desired data in a temporoary table; then
>use COPY to store the data in a file and finally use COPY to read the data
>from the file to the target table.


         What is the last word in synopsis? 

In response to


pgsql-novice by date

Next:From: Van Ingen, LaneDate: 2005-04-27 14:43:58
Subject: SQL COPY Command
Previous:From: George WeaverDate: 2005-04-27 13:36:00
Subject: Re: Copy data from table to table

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group