Externos MED postgres=# CREATE FOREIGN DATA WRAPPER pgday VALIDATOR postgresql_fdw_validator; postgres=# CREATE SERVER srvpgday FOREIGN DATA WRAPPER pgday OPTIONS (host ’srv-pgday’, dbname ’pgday’, port ’5432’); postgres=# CREATE USER MAPPING FOR lhcezar SERVER srvpgday OPTIONS (user ’lhcezar’, password ’lhcezar’); postgres=$ SELECT dblink_connect(’pgday_c’, ’srvpgday’); postgres=$ SELECT * from dblink(’pgday_c’, ’SELECT * FROM pgday’) AS (id int, palestra varchar); id | palestra ----+----------------- 1 | SQL Proficiente Leonardo Cezar SQL Proficiente