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