is there any way to use the new foreign table feature with dblink?
That's almost clear to me:
CREATE FOREIGN DATA WRAPPER pgsql90;
CREATE SERVER srvlocal90 FOREIGN DATA WRAPPER pgsql90 OPTIONS (hostaddr '127.0.0.1', dbname 'lotty');
CREATE USER MAPPING FOR pgsql SERVER srvlocal90 OPTIONS (user 'pgsql', password '');
I would like to replace this
SELECT dblink_connect('myconn', 'srvlocal90');
SELECT * FROM dblink('myconn', 'select * from mytests.fttest') AS t(id int, myname text);
to something like this:
CREATE FOREIGN TABLE mytests.lnkto90_fttest (
id int,
myname text
)
SERVER srvlocal90 OPTIONS (????)
SELECT * FROM mytests.lnkto90_fttest;
Ty