Re: foreign keys on multiple parent table - Mailing list pgsql-general

From David G. Johnston
Subject Re: foreign keys on multiple parent table
Date
Msg-id CAKFQuwbo+wunJ7MaQHWxCMkrGu1DQUn2EqGJk_tTjg49FpzczQ@mail.gmail.com
Whole thread Raw
In response to foreign keys on multiple parent table  (Lorusso Domenico <domenico.l76@gmail.com>)
List pgsql-general
On Tuesday, June 20, 2023, Lorusso Domenico <domenico.l76@gmail.com> wrote:

Could work, but is there a way to set a reference key over the uuid of all the tables?

A foreign key in PostgreSQL is between two, and only two, tables.  The PK side of which must be uniquely constrained.

You can write custom triggers if you need something other than this.

David J.

pgsql-general by date:

Previous
From: Lorusso Domenico
Date:
Subject: foreign keys on multiple parent table
Next
From: Les
Date:
Subject: Re: foreign keys on multiple parent table