db=> i my_script.sql
export PGPASSWORD=<password> psql -h <host> -d <db> -U <user> -p 5432 -a -q -f <path_to_file>
psql -d some_database