Running SQL files
Commands and statements can be executed via a *.sql
file from the command line using the following command:
psql -d your_database_name -U your_username < commands.sql
Alternatively, they can be executed via the SQL interpreter:
database=#
To get to the interactive interpreter, type the following command:
psql -d your_database_name -U your_username