title: Using pg_dump, export entire schema for all tables and data for one table
body: <p>I'd like to export the entire schema using pg_dump as well as the data within a single table. I know I can do something like this:</p>
  
  <p><code>pg_dump -s mydatabase &gt; db.sql; pg_dump -a -t some_table mydatabase &gt;&gt; db.sql</code></p>
  
  <p>However, it's somewhat inelegant, and the output of the second half repeats a lot of settings and comments that the first half already provides such as: </p>
  
  <pre><code>-- Dumped from database version 9.6.8
  -- Dumped by pg_dump version 9.6.8
  
  SET statement_timeout = 0;
  SET lock_timeout = 0;
  ...
  </code></pre>
  
  <p>Is there a better way to do this?</p>