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