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

Re: Table transfer

From: "Rob Richardson" <Rob(dot)Richardson(at)rad-con(dot)com>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Table transfer
Date: 2010-09-23 12:49:08
Message-ID: 04A6DB42D2BA534FAC77B90562A6A03D01554CE1@server.rad-con.local (view raw or flat)
Thread:
Lists: 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(dot)richardson(at)RAD-CON(dot)com

In response to

pgsql-novice by date

Next:From: Mladen GogalaDate: 2010-09-23 13:33:28
Subject: Statistics with temporary tables, optimizer question
Previous:From: Rob RichardsonDate: 2010-09-23 12:34:35
Subject: Re: log options

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