dblink EXTENSION is a technique to connect another database and make operation of this database so to do that you need:
1-Create a dblink extention:
CREATE EXTENSION dblink;
2-Make your operation:
For exemple Select some attribute from another table in another database:
SELECT * FROM
dblink ('dbname = bd_distance port = 5432 host = 10.6.6.6 user = username
password = passw@rd', 'SELECT id, code FROM schema.table')
AS newTable(id INTEGER, code character varying);