postgres_fdw - Mailing list pgsql-bugs

From M Zav.
Subject postgres_fdw
Date
Msg-id CAGsGaG0nkyo0kdYTCJyWyfq6EBsf87eEv7gLsMcDhPvrSHCAYQ@mail.gmail.com
Whole thread Raw
List pgsql-bugs

Hi there,

I got a weird result while using postgres_fdw for foreign table import. It converted tables into type (and no data obviously). This is on Postgres 10.

psql -d locdb -U postgres -h localhost
CREATE EXTENSION postgres_fdw;
\dx
grant usage on FOREIGN DATA WRAPPER postgres_fdw to locdb_u1;

-- Now as locdb_u1

CREATE SERVER s1 FOREIGN DATA WRAPPER postgres_fdw OPTIONS (dbname 'remdb', host '170.17.5.20', port '5432');
CREATE USER MAPPING for calcium SERVER s1 OPTIONS (user 'remdb_u1', password 'remdb_u1');
IMPORT FOREIGN SCHEMA "remdb_fs" limit to (tab1, tab2, tab3, tab4) FROM SERVER s1 INTO local_schema1;
set schema 'local_schema1';

\dt
Did not find any relations.

And now I can see them in pgadmin as "Types" and not as tables (and obviously no data).

Am I doing anything wrong? Any suggestions? 


PS: To protect the server /user details, i have renamed few things in email but all the commands have worked and now those exact four tables are appearing into local schema as four "types" with same structure as  table and few more fields got added to it automatically ..

tableoid oid,
cmax cid,
xmax xid,
cmin cid,
xmin xid,
ctid tid,
id integer,

I am pasting above field names by using pgadmin create script on one of the type. 

Please advise.


pgsql-bugs by date:

Previous
From: Kyotaro HORIGUCHI
Date:
Subject: Re: BUG #15449: file_fdw using program cause exit code error whenusing LIMIT
Next
From: Etsuro Fujita
Date:
Subject: Re: BUG #15449: file_fdw using program cause exit code error whenusing LIMIT