Use this SQL code
copy table_name(atribute1,attribute2,attribute3...)
from 'E:\test.csv' delimiter ',' csv header
the header keyword lets the DBMS know that the csv file have a header with attributes
for more visit http://www.postgresqltutorial.com/import-csv-file-into-posgresql-table/