FOREIGN TABLE with dblink - Mailing list pgsql-general

From Jasmin Dizdarevic
Subject FOREIGN TABLE with dblink
Date
Msg-id BANLkTimcdEodPKRFhJfayg+58ra2vxr=AQ@mail.gmail.com
Whole thread Raw
Responses Re: FOREIGN TABLE with dblink
List pgsql-general
Hi, 

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

pgsql-general by date:

Previous
From: Sanjay Rao
Date:
Subject: Re: streaming replication trigger file
Next
From: Greg Smith
Date:
Subject: Re: You could be a PostgreSQL Patch Reviewer!