how to copy data from one database to another database in postgresql?
I am trying to开发者_如何转开发 copy tables from one postgresql8.4 to another postgresql8.4 and I am not sure how do I do that?
Can't you just take pg_dump
from one and import in another? Seems quite trivial.
Take a look at this:
http://www.postgresql.org/docs/8.4/static/backup-dump.html
You should be able to so it using a database link:
http://www.postgresql.org/docs/8.4/static/contrib-dblink.html
if you have postgres contrib installed you need to type this once is psql:
CREATE EXTENSION dblink;
精彩评论