Re: Lookup Primary Key of Foreign Server's Table

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Chris Morris <chris(at)mysteryscience(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 16:11:54
Message-ID: CAKFQuwYAd7MYqHQDJnw4=c+KBPu8=_EosLCrw9brEg-e+VYWgQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Oct 23, 2019 at 8:47 AM Chris Morris <chris(at)mysteryscience(dot)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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Maciek Sakrejda 2019-10-23 16:13:08 Re: EXPLAIN BUFFERS and I/O timing accounting questions
Previous Message Ron 2019-10-23 16:09:51 Re: Is this a bug ?