I need to transfer some data from another database. The old database is called paw1.moviesDB and the new database is paw1. The schema of each table are the following.
<
This worked for me to copy a table remotely from my localhost to Heroku's postgresql:
pg_dump -C -t source_table -h localhost source_db | psql -h destination_host -U destination_user -p destination_port destination_db
This creates the table for you.
For the other direction (from Heroku to local)
pg_dump -C -t source_table -h source_host -U source_user -p source_port source_db | psql -h localhost destination_db