Re: Lookup Primary Key of Foreign Server's Table

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Lookup Primary Key of Foreign Server's Table
Дата
Msg-id CAKFQuwZOwKGWFM9ockGEfvVcNAfMpHhnLV9EpZ2he1m+otG=Ew@mail.gmail.com
обсуждение исходный текст
Ответ на Lookup Primary Key of Foreign Server's Table  (Chris Morris <chris@mysteryscience.com>)
Ответы Re: Lookup Primary Key of Foreign Server's Table  (Chris Morris <chris@mysteryscience.com>)
Список pgsql-general
On Tue, Oct 22, 2019 at 9:16 AM Chris Morris <chris@mysteryscience.com> wrote:
I'm looking for a system query that will lookup the primary key column on a fdw table. It's possible we need to declare that part of the foreign table's schema in the local (is that the right term?) database?

Here's the foreign table - I don't see anything showing a primary key, so my hunch is we need to declare it in the local schema?

=> \d sidecar_link.actions

I'm not seeing anything in the local FDW table definition that deals with PK/FK constraints so I'm led to believe that what you are asking is not possible.  Consider detailing what your goal is and not just your technical need.

Not really related question, but a curiosity: why does this table not show in the list of foreign tables?

I suspect for the same reason you added the schema prefix "sidecar_link" to the table name when you issued \d above.

=> \det
 List of foreign tables
 Schema | Table | Server
--------+-------+--------
(0 rows)


David J.

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

Предыдущее
От: Chris Morris
Дата:
Сообщение: Lookup Primary Key of Foreign Server's Table
Следующее
От: stan
Дата:
Сообщение: An issue installing an extension