pg_dump allows you to reset only selection tables:
pg_dump -Fc -f output.dump -t tablename databasename
(dump 'tablename' from the database 'databasename' to the file 'output.dump' in binary user format pg_dumps)
You can restore this dump to another server using pg_restore :
pg_restore -d databasename output.dump
If the table itself already exists in your target database, you can import only rows by adding the --data-only flag.
janfoeh
source share