pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Postgresql FDW - some difference between remote and target table structure
3+ messages / 2 participants
[nested] [flat]

* Postgresql FDW - some difference between remote and target table structure
@ 2017-10-05 10:44  Günce Kaya <guncekaya14@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Günce Kaya @ 2017-10-05 10:44 UTC (permalink / raw)
  To: pgsql-admin

Hi all,

We use FDW for some schemas and tables but I realised that a foreign
table's columns in FDW server and same table's columns in target database(I
said target db cause I'm not sure correct name for it) doesn't match. For
instance; in FDW server, I select that table and I can see XXX column,
however when I select same table and I can not see same column in target
database.

I check this table type in information_schema.tables and type of this table
is foreign table in .

Why there is some difference between FDW and target database? Is there
anyone who can explain it?

Regards,
Gunce Kaya

Linkedin <https://tr.linkedin.com/in/guncekaya; - Twitter
<https://twitter.com/gguncesi; - Blog
<http://www.guncekaya.blogspot.com.tr/;

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Postgresql FDW - some difference between remote and target table structure
@ 2017-10-05 13:55  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Günce Kaya <guncekaya14@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 2017-10-05 13:55 UTC (permalink / raw)
  To: Günce Kaya <guncekaya14@gmail.com>; +Cc: pgsql-admin

=?UTF-8?Q?G=C3=BCnce_Kaya?= <guncekaya14@gmail.com> writes:
> Why there is some difference between FDW and target database? Is there
> anyone who can explain it?

Either the foreign table was created without that column to begin with,
or the column was added to the remote table later and the foreign table
wasn't updated to match.  Foreign tables don't magically track what is
on the remote server; they just have the set of columns you told the
local server they should have.

			regards, tom lane


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Postgresql FDW - some difference between remote and target table structure
@ 2017-10-05 14:19  Günce Kaya <guncekaya14@gmail.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Günce Kaya @ 2017-10-05 14:19 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin

Hello Tom,

I appreciate to your response. It’s clear now to me.

Regards,
Gunce


On 5 Oct 2017 Thu at 16:55 Tom Lane <tgl@sss.pgh.pa.us> wrote:

> =?UTF-8?Q?G=C3=BCnce_Kaya?= <guncekaya14@gmail.com> writes:
> > Why there is some difference between FDW and target database? Is there
> > anyone who can explain it?
>
> Either the foreign table was created without that column to begin with,
> or the column was added to the remote table later and the foreign table
> wasn't updated to match.  Foreign tables don't magically track what is
> on the remote server; they just have the set of columns you told the
> local server they should have.
>
>                         regards, tom lane
>
-- 
Gunce Kaya

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2017-10-05 14:19 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-10-05 10:44 Postgresql FDW - some difference between remote and target table structure Günce Kaya <guncekaya14@gmail.com>
2017-10-05 13:55 ` Tom Lane <tgl@sss.pgh.pa.us>
2017-10-05 14:19   ` Günce Kaya <guncekaya14@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox