how to import data from one database to another in postgres?
Use pg_dump to dump table data, and then restore it with psql. It will copy the mentioned table of source Database into same named table of target database, if you already have existing schema.