title: How to use (install) dblink in PostgreSQL?
body: <p>I am used to Oracle and to create a dblink in my schema and then access to a remote database like this: <code>mytable@myremotedb</code>, is there anyway do to the same with PostgreSQL?</p>
  
  <p>Right now I am using dblink like this: </p>
  
  <pre><code>SELECT logindate FROM dblink('host=dev.toto.com
                                user=toto
                                password=isok
                                dbname=totofamily', 'SELECT logindate FROM loginlog');
  </code></pre>
  
  <p>When I execute this command I get the following error:</p>
  
  <blockquote>
    <p>HINT: No function matches the given name and argument types. You might need to add explicit type casts.</p>
  </blockquote>
  
  <p>Does anybody have an idea ? Do we have to "activate" dblinks or do something before using them?</p>
  
  <p>Is there something to do on the remote database we are going to query? Do we have to activate dblink too? I keep having a <code>could not establish connection</code>. This is the line is type:</p>
  
  <pre><code>SELECT dblink_connect_u('host=x.x.x.x dbname=mydb user=root port=5432');
  </code></pre>
  
  <p>IP Address is correct and Postgres is running on the remote server. Any idea?</p>