Re: Inheritance in PostgreSQL - Mailing list pgsql-general

From Merlin Moncure
Subject Re: Inheritance in PostgreSQL
Date
Msg-id CAHyXU0wyo7dr-cq=S96JBo3my7R_MKgSHhWKb7uNCC2a_z691w@mail.gmail.com
Whole thread Raw
In response to Re: Inheritance in PostgreSQL  (Thomas Kellerer <shammat@gmx.net>)
List pgsql-general
On Wed, Oct 18, 2023 at 7:43 AM Thomas Kellerer <shammat@gmx.net> wrote:
Merlin Moncure schrieb am 18.10.2023 um 03:20:
> The only thing you can't really do in SQL easily without writing
> nasty triggers are things like, 'this table must be linked from one
> and only one of these candidate tables'.  I think the language
> probably ought to support this, but I don't think postgres would
> unless the standard did.

Isn't that what assertions are intended to solve in the SQL standard?

Hm, interesting, <googles> ...maybe, maybe not.   SQL '92 -- wow.  guessing why not:  Are they deferrable, always deferred? Doesn't seem like it, simple inheritance cases would seem problematic otherwise, chicken/egg conditions. This might explain why they are not in common use despite being innovated 30 years ago.  Here is an Oracle discussion on the topic:


...with the discussion implying that interaction with the transaction state may be an unsolved problem, at least within oracle.  I suspect there may also be challenges relating to performant implementation.  Sadly, I think the correct approach remains to utilize complex triggers, or nothing.

merlin

pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: psql \du no more showing "member of" column
Next
From: Abelardo Erazo Lopez
Date:
Subject: Driver Postgresql HP-Unix