Re: Lookup Primary Key of Foreign Server's Table

From: Chris Morris <chris(at)mysteryscience(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Lookup Primary Key of Foreign Server's Table
Date: 2019-10-23 15:47:41
Message-ID: CALrUc2Uw3-3fg3HpSe8Mpx9BL7me_YZhQ3LD-W1BdFZFfn+RZQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron 2019-10-23 15:47:42 Re: Is this a bug ?
Previous Message Ravi Krishna 2019-10-23 15:42:31 Is this a bug ?