I\'ve been using the psql Postgres terminal to import CSV files into tables using the following
COPY tbname FROM \'/tmp/the_file.csv\' delimiter \'|\' csv; <
To complete the previous answer, I would suggest:
psql -d your_dbname --user=db_username -c "COPY tbname FROM '/tmp/the_file.csv' delimiter '|' csv;"