I am trying to copy an entire table from one database to another in Postgres. Any suggestions?
Using dblink would be more convenient!
truncate table tableA; insert into tableA select * from dblink('hostaddr=xxx.xxx.xxx.xxx dbname=mydb user=postgres', 'select a,b from tableA') as t1(a text,b text);