title: Is there any shortcut for using dblink in Postgres?
body: <p>In Postgres, you can link to your other databases using <code>dblink</code>, but the syntax is very verbose.  For example you can do:</p>
  
  <pre><code>SELECT *
  FROM dblink (
      'dbname=name port=1234 host=host user=user password=password',
      'select * from table'
  ) AS users([insert each column name and its type here]);
  </code></pre>
  
  <p>Is there any way to do this faster?  Maybe pre-define the connections?</p>
  
  <p>I noticed that Postgres has a new <code>create foreign table</code> function for connecting to a MySQL database.  It has a simpler syntax than <code>dblink</code>.  Could I use that?</p>