postgres_fdw

From: "M Zav(dot)" <mxav1111(at)gmail(dot)com>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: postgres_fdw
Date: 2018-11-07 00:36:18
Message-ID: CAGsGaG0nkyo0kdYTCJyWyfq6EBsf87eEv7gLsMcDhPvrSHCAYQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Browse pgsql-bugs by date

  From Date Subject
Next Message Amit Langote 2018-11-07 01:45:57 Re: BUG #15212: Default values in partition tables don't work as expected and allow NOT NULL violation
Previous Message Kyotaro HORIGUCHI 2018-11-07 00:22:45 Re: BUG #15449: file_fdw using program cause exit code error when using LIMIT