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
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
TECHNOLOGY: Innovative & Proven
Phone : +1.440.871.5720 ... ext 123
In response to
pgsql-novice by date
|Next:||From: Mladen Gogala||Date: 2010-09-23 13:33:28|
|Subject: Statistics with temporary tables, optimizer question|
|Previous:||From: Rob Richardson||Date: 2010-09-23 12:34:35|
|Subject: Re: log options|