how to import export csv in postgresql

Export:

\copy (SELECT * FROM your_table)
TO '/tmp/your_table.csv' CSV HEADER FORCE QUOTE *;

Import:

\copy your_table FROM '/tmp/your_table.csv' CSV HEADER;