title: How to restore PostgreSQL dump file into Postgres databases?
body: <p>I have a dump file with a <code>.SQL</code> extension (in fact it is a plain-text SQL file). I want to restore it into my created databases. I am using <a href="http://www.pgadmin.org/" rel="noreferrer">pgAdmin III</a>, and when I use its "Restore Wizard" it does not highlight the button "Restore". Instead it is expecting a <code>.backup</code> file extension.</p>
  
  <p>I tried using shell the commands for restoring the dump, but it still didn't work.</p>
  
  <p>I am a newbie at this. If anybody could help me I would be obliged.</p>
  
  <h2>Edit</h2>
  
  <p>I used following command to the Shell SQL Pane of PostGres while sitting at the newTestDB.</p>
  
  <pre><code>newTestDB-# \i E:\db-rbl-restore-20120511_Dump-20120514.sql
  </code></pre>
  
  <p>It still gave the same error ("Permission Denied").</p>
  
  <p>After elevating permissions it just shows me the default tables of PostgreSQL:</p>
  
  <pre><code>      List of tablespaces
  Name       |  Owner   | Location
  -----------+----------+----------
  pg_default | postgres |
  pg_global  | postgres |
  
  (2 rows)
  </code></pre>
  
  <p>I don't know what to do for importing/restoring database from an SQL file.</p>