how to run a sql file from postgre sql shell code example Example: psql execute sql file db=> \i my_script.sql