psql select database to execute queries on code example Example: psql execute sql file db=> \i my_script.sql