e.g.
-
pg_dump -U [username] -h [hostname] -p [port number] -d [source database] -t [source_table] > [output_filename].sql
-
cat [output_filename].sql | psql -U [username] -h [hostname] -p [port number] -d [target database]
If the [target database] already has the table that you want to copy, then run the pg_dump with a "-a" flag to dump 'data only'
This is split into two operations as each will require a password to be supplied interactively. Clearly if you are happy to issue the commands relying on a ~/.pgpass file (i.e. it's being done over SSH) you can pipe the former into the latter without having to use [output_filename].sql as an interim step, thus:
pg_dump -U [username] -h [hostname] -p [port number] -d [source database] -t [source_table] | psql -U [username] -h [hostname] -p [port number] -d [target database]