Re: Purely declarative FKs - Mailing list pgsql-general

From Ron
Subject Re: Purely declarative FKs
Date
Msg-id 69f7c5ff-02bc-42ee-a98f-3f990fb44f3b@gmail.com
Whole thread Raw
In response to Re: Purely declarative FKs  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On 10/16/23 09:06, Tom Lane wrote:
> Christophe Pettus <xof@thebuild.com> writes:
>> On Oct 16, 2023, at 00:51, Thiemo Kellner <thiemo@gelassene-pferde.biz> wrote:
>>> Question: Are there plans to provide a feature in PostgreSQL that one
>>> can have foreign keys for purely documentation purpose - I know, one
>>> could use a modelling tool and just not implement the FKs, but my
>>> reality is, there is hardly ever a modelling tool involved.
>> The answer to the specific question is, no, I don't believe that there
>> any plans to implement purely documentary foreign keys.
> Recent versions of the SQL spec have a NOT ENFORCED option for
> constraints, which is what I think you're looking for here.
> If somebody came with a well-thought-out patch to add that feature,
> we'd likely take it.  But this is definitely a "scratch your own
> itch" situation; I don't know of anyone already working on such
> a thing.

NOT ENFORCED would be a great boon to administrators writing regular 
archive/purge operations.

-- 
Born in Arizona, moved to Babylonia.



pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Purely declarative FKs
Next
From: Laurenz Albe
Date:
Subject: Re: Question About PostgreSQL Extensibility