Pass SQL File to psql

If you have a file with sql in it (say create-table.sql) you can pass it to postgres via the client program psql with the following syntax:

$ psql database < create-table.sql

Links