title: Deploy postgres via jenkins - continuous integration/deployment
body: <p>I got my database dump (tables, functions, triggers etc) in *.sql files.
  At this moment I am deploying them via jenkins, by passing execute shell command:</p>
  
  <pre><code>sudo -u postgres psql -d my_db &lt; /[path_to_my_file].sql
  </code></pre>
  
  <p>The problem is, that if something is wrong in my sql file, build finishes as SUCCESS. I would like to got information immediately if something fails, without looking into log and checking if every command executed succesfully.</p>
  
  <p>Is it possible (and how if the answer is 'yes') to deploy postgres database via jenkins other way?</p>