title: Can the pg gem be used to import database dump (.sql) files?
body: <p>We've got some utility rake tasks for cloning postgres databases from Heroku to local development machines for testing with "real" data. They tend to run the import with shell commands of <code>pg_restore</code>, e.g.</p>
  
  <pre><code>sh 'pg_restore --verbose --clean --create --no-owner -h localhost &lt;dbname&gt; &lt;filename&gt;'
  </code></pre>
  
  <p>Can this sort of postgres operation be achieved with the pg gem (already in place for Rails) or is our punt-to-shell operation here really the best way to do it? I haven't found anything promising in <a href="http://deveiate.org/code/pg/" rel="nofollow">the documentation</a>.</p>