strip commits from sql before passing to psql