When you need to copy a small set of data from one database to an another (say, from dev system to a QA system), you could use the copy feature of PSQL.
To get the data in CSV of a select query:
duggout=> copy (select * from lookups where lkp_type = 'homepage_items' ) to STDOUT with csv;
6514,homepage_items,side_1,6,,,,,,,,,2014-10-06 15:47:25.216133,2014-10-06 15:47:25.216133
6515,homepage_items,list_main,"1,2,3,4,5,6,7",,,,,,,,,2014-10-08 02:52:52.995771,2014-10-08 02:52:52.995771
6516,homepage_items,image_main,"5,6,7",international_match,f,,,,,,,2014-10-05 14:06:55.591311,2014-10-11 08:14:47.196494
To load the data into the table in another environment:
COPY lookups FROM STDIN with csv;
Now, paste the CSV data with a trailing new line. And then \. (backslash with a dot). This should append the CSV data in the target table. When you want to copy more data, use the file option instead of STDIN/STDOUT. Check the doc for the usages.
To copy a large table, use the binary option:
remote_db=# copy table_name to '/tmp/a_path' with binary;
You could copy the file to your local using scp, if the file is in a remote server. Then,
local_db=# copy table_name from 'local_path' with binary;
It is as simple as that!