title: How to copy structure of one table to another with foreign key constraints in psql?
body: <p>Foreign key constraints are not copied when using</p>
  
  <pre><code>create table table_name ( like source_table INCLUDING ALL)' 
  </code></pre>
  
  <p>in Postgres. How can I create a copy of an existing table including all foreign keys.</p>