Copying table subset from one database to another with same schema
It's not very clear what your goal is. 
 If you want to copy data and ensure its' referential integrity, then you'll need to modify your SELECT so it picks up all dependent rows (check recursive CTE for details). 

If want to just copy data , and don't care about referential integrity, you can either drop or disable FK constraints during import.  Since FK in Postgres enforced with triggers, you can ALTER table disable trigger all , import, and enable them . 
Another way to disable all triggers would be SET session_replication_role = replica;, import data, then reset to default SET session_replication_role = DEFAULT;