Re: Forward declaration of table - Mailing list pgsql-general

From David G. Johnston
Subject Re: Forward declaration of table
Date
Msg-id CAKFQuwaKhPN3GQ7HShmaM4qorqKq64ezrLGAJSVC49g-xx9o1A@mail.gmail.com
Whole thread Raw
In response to Forward declaration of table  (Alexander Farber <alexander.farber@gmail.com>)
List pgsql-general
On Tue, Aug 23, 2016 at 1:10 PM, Alexander Farber <alexander.farber@gmail.com> wrote:

So my question is if I can somehow "forward declare" the words_moves table?


​A better way to phrase this is:

Is it possible to create circular foreign key dependencies between tables?

The answer is no.

You generally need to introduce a third table.  I haven't delved deep enough into your scenario to be more specific.

David J.
 

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Forward declaration of table
Next
From: "David G. Johnston"
Date:
Subject: Re: Forward declaration of table