Re: Lookup Primary Key of Foreign Server's Table - Mailing list pgsql-general

From David G. Johnston
Subject Re: Lookup Primary Key of Foreign Server's Table
Date
Msg-id CAKFQuwYAd7MYqHQDJnw4=c+KBPu8=_EosLCrw9brEg-e+VYWgQ@mail.gmail.com
Whole thread Raw
In response to Re: Lookup Primary Key of Foreign Server's Table  (Chris Morris <chris@mysteryscience.com>)
Responses Re: Lookup Primary Key of Foreign Server's Table
List pgsql-general
On Wed, Oct 23, 2019 at 8:47 AM Chris Morris <chris@mysteryscience.com> wrote:
The foreign table has a primary key. Ruby on Rails uses a system query to lookup what the primary key on the table is, but it's querying the local database, and not finding anything. In a schema dump of the local database, I don't see a primary key defined, so I'm presuming I need to issue an ADD CONSTRAINT command against the foreign table to reflect what is actually true in the foreign table? Is that correct?

The documentation says doing what you suggest won't work...

David J.

pgsql-general by date:

Previous
From: Ron
Date:
Subject: Re: Is this a bug ?
Next
From: Maciek Sakrejda
Date:
Subject: Re: EXPLAIN BUFFERS and I/O timing accounting questions