Search Postgresql Archives

FOREIGN TABLE with dblink

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux