2

How can I check if the structure of a foreign table was changed in the source database in order to know when to re import it. Foreign table was imported by foreign-data wrapper postgres_fdw (PostgreSQL 11.2).

2
  • What is the PostgreSQL version(x,y,z)? Commented Apr 24, 2019 at 8:22
  • PostgreSQL 11.2 Commented Apr 24, 2019 at 10:30

1 Answer 1

1

How can I check if the structure of a foreign table was changed in the source database in order to know when to re import it. Foreign table was imported by foreign-data wrapper postgres_fdw.

As here and here if you’ve imported your schema, then you can query the foreign tables as if they were normal, local tables.

For further your ref postgres_fdw and IMPORT FOREIGN SCHEMA

1
  • 1
    yes, I can query the content of foreign table as if it was normal, but can I query its structure? e.g. if in the original database somebody added/dropped/renamed a column to the table, can I get this (structural) information in the context of the database where this table is imported as a foreign table? Commented Apr 24, 2019 at 11:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.