Withdata Software

How to execute sql file via command line for PostgreSQL

Use psql

psql -U username -d myDataBase -a -f myInsertFile

More information: http://blog.manoharbhattarai.com.np/2013/04/03/execute-sql-file-from-command-line-in-postgresql/