title: pg_restore certain tables only
body: <p>I'm trying to write a <code>pg_restore</code> command to restore only certain tables (and their data) to my database.</p>
  
  <p><strong>Note: every command described begins with me dropping and re-creating the database and ends in: <code>-v -x -O -j 8 -h localhost -U username -d database file.dump</code></strong> (For the curious, I didn't want to use <code>--clean</code> because the database that the dump came from has a different name.)</p>
  
  <p>Since <code>pg_restore</code> works fine for me (with the above args), I looked at the <a href="http://www.postgresql.org/docs/current/static/app-pgrestore.html" rel="nofollow"><code>pg_restore</code> documentation</a>, and tried something like this:</p>
  
  <p><code>pg_restore -t table1 -t table2 ...</code> (there are 121 tables I specify in this way).</p>
  
  <p>However, I get errors like the following:</p>
  
  <pre><code>pg_restore: creating TABLE people
  pg_restore: [archiver (db)] Error from TOC entry 123; 1234 12345 TABLE people dumped_table_username
  pg_restore: [archiver (db)] could not execute query: ERROR:  type "hstore" does not exist
  LINE 14:     extra_data hstore,
                          ^
      Command was: CREATE TABLE people (
      id integer NOT NULL,
      name string,
      age integer,
      date_of_birt...
  </code></pre>
  
  <p>I don't see why this would be an issue only when the <code>-t</code> flag is set, but it appears to be.</p>
  
  <p>What's going on?</p>
  
  <hr>
  
  <p><strong>Edit:</strong> looks like this is a duplicate of <a href="https://stackoverflow.com/questions/28200164/pg-restore-on-table-failing-because-of-hstore">pg_restore on table failing because of hstore</a>, which was recently asked and has no accepted answer as of this time.</p>