I have a number of files which need to be run against a postgres database. They are stored as separate files for reasons of maintenance and configuration management. I am using this type of method to run them
acro =# \i ./psql.sql
acro =# \i ./psql.function1.sql
acro =# \i ./psql.function2.sql
acro =# \i ./psql.function3.sql
acro =# \i ./psql.function4.sql
etc
Is there a way to batch these commands or these file names up, so that they can be run as a single interactive command ?
Thanks
cat psql.sql psql.function1.sql psql.function2.sql | psql