Search Postgresql Archives

Re: Lookup Primary Key of Foreign Server's Table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 22, 2019 at 9:16 AM Chris Morris <chris@xxxxxxxxxxxxxxxxxx> 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.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux