title: What's the best way to copy a subset of a table's rows from one database to another in Postgres?
body: <p>I've got a production DB with, say, ten million rows. I'd like to extract the 10,000 or so rows from the past hour off of production and copy them to my local box. How do I do that?</p>
  
  <p>Let's say the query is:</p>
  
  <pre><code>SELECT * FROM mytable WHERE date &gt; '2009-01-05 12:00:00';
  </code></pre>
  
  <p>How do I take the output, export it to some sort of dump file, and then import that dump file into my local development copy of the database -- as quickly and easily as possible?</p>