Re: Attaching database

Поиск
Список
Период
Сортировка
От Julien Rouhaud
Тема Re: Attaching database
Дата
Msg-id 20221019031632.75ksr5trvq7tz5uy@jrouhaud
обсуждение исходный текст
Ответ на Re: Attaching database  (Igor Korot <ikorot01@gmail.com>)
Список pgsql-general
Hi,

On Tue, Oct 18, 2022 at 10:06:40PM -0500, Igor Korot wrote:
> Hi, guys,
> After reading the documentation on
> https://www.postgresql.org/docs/current/postgres-fdw.html
> and checking the example I have a different question.
>
> The presentation in the link referenced doesn't explain how to get the
> table list on the
> remote server and the information on the specific table.
>
> The example tals about connection and creating a linked table, but it
> doesn't explain
> how to know the information about the tables on the remote
>
> Is it possible or I will have to know this beforehand?

In general it's up to you to make sure that the remote table definition matches
the local one.  You can use IMPORT FOREIGN SCHEMA (1) to automate this process,
but you will still have to make sure that any subsequent modification on the
remote table (added/removed column, changed datatype...) is also done on the
local foreign table.

> (Sorry for the top-posting).

This isn't really related to the previous discussion so it's quite ok, although
it's usually a good practice to trim the unwanted parts of the previous
message (in this case the whole previous message).

[1] https://www.postgresql.org/docs/current/sql-importforeignschema.html



В списке pgsql-general по дате отправления:

Предыдущее
От: Igor Korot
Дата:
Сообщение: Re: Attaching database
Следующее
От: Christophe Pettus
Дата:
Сообщение: Re: COMMIT IN STORED PROCEDURE WHILE IN A LOOP