how to run a .sql file in postgresql code example Example: psql execute sql file db=> \i my_script.sql