Re: Table transfer - Mailing list pgsql-novice

From Rob Richardson
Subject Re: Table transfer
Date
Msg-id 04A6DB42D2BA534FAC77B90562A6A03D01554CE1@server.rad-con.local
Whole thread Raw
In response to Re: Table transfer  ("Eric Comeau" <Eric.Comeau@signiant.com>)
List pgsql-novice
Using PGAdmin, you can do the following:

1.  Click on the source table.  The SQL to create the table appears.
Copy that code.
2.  Click on your destination database, and then open an SQL window.
Paste the code into that window and execute it.  You now have a table in
your destination database that is identical to the source table.
3.  Right-click on the source table.  Select "Backup", and back up the
table.
4.  Right-click on the destination table.  Select "Restore", and restore
data from the file you created in the previous step.
5.  Write a query that will copy data from the destination table into
the table that actually needs it.
6.  Drop the destination table.

Of course, dblink is a nice tool, and worth knowing.  Someday I should
learn about it.

Robert D. Richardson
Product Engineer Software

RAD-CON, Inc.
TECHNOLOGY: Innovative & Proven
Phone : +1.440.871.5720 ... ext 123
Fax:  +1.440.871.2948
Website:  www.RAD-CON.com
E-mail:  rob.richardson@RAD-CON.com

pgsql-novice by date:

Previous
From: "Eric Comeau"
Date:
Subject: Re: Table transfer
Next
From: Mladen Gogala
Date:
Subject: Statistics with temporary tables, optimizer question