Shell script to execute pgsql commands in files

后端 未结 5 1725
囚心锁ツ
囚心锁ツ 2020-12-05 23:08

I am trying to automate a set of procedures that create TEMPLATE databases.

I have a set of files (file1, file2, ... fileN), each of which contains a set of pgsql com

5条回答
  •  感情败类
    2020-12-05 23:33

    If you're willing to go the extra mile, you'll probably have more success with sqlalchemy. It'll allow you to build scripts with python instead of bash, which is easier and has better control.

    As requested in the comments: https://github.com/srathbun/sqlCmd

提交回复
热议问题