lundi 20 avril 2015

Problems while Using postgres_fdw

I m getting some problem while using postgres_fdw.

    CREATE SERVER foreign_server
    FOREIGN DATA WRAPPER postgres_fdw
    OPTIONS (host '192.162.0.1', port '5432', dbname 'Test');



    CREATE USER MAPPING FOR postgres
    SERVER foreign_server
    OPTIONS (user 'foreign_user', password 'password');


    CREATE FOREIGN TABLE foreign_table (
    id serial NOT NULL,
    data text)SERVER foreign_server
    OPTIONS (schema_name 'public', table_name 'employee');


    select * from employee  where user ='foreign_user'

Now I can see entries are made to pg_foreign_data_wrapper,pg_foreign_server,pg_foreign_table tables.
But How do I access employee table of remote system.

I mean select * from employee where user ='foreign_user' doesn't give any result.Though it has data in Employee table of remote system.

please do help
Regards

Aucun commentaire:

Enregistrer un commentaire