We work on Postgresql 9.6, installed on Linux.
We get SQL code requests coming from different teams, such as DDLs, DMLs, TCLs etc.
We have various environments such as DEV01, DEv02, ST01, ST02 and UAT.
My task is to deploy the code snippets coming from individual code requests, into all the above environments.
Currently i'm copying and pasting these scripts manually into each of the aboce environments.
Is there a way to automate this effort so that, i can change the db in a file and quickly execute the code?