postgres execute sql file from command line on remote server code example Example: psql execute sql file db=> \i my_script.sql