Re: Trigger violates foreign key constraint

From: Aleksander Alekseev <aleksander(at)timescale(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Trigger violates foreign key constraint
Date: 2023-11-16 13:40:28
Message-ID: CAJ7c6TOcciVg_TS2UxpBThUAiutgO2nb98DNBgE-fU1VjGurKg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

> Attached is a slightly modified version of the patch.

The patch was marked as "Needs Review" so I decided to take a look.

I believe it's a good patch. The text is well written, has the
necessary references, it warns the user but doesn't scare him/her too
much.

> I couldn't make it clearer. I'd have to write an example to make it clearer,
> and that would certainly be out of scope.

Personally I don't think we should document particular steps to break
FK constraints. In a similar situation when we documented the
limitations about XID wraparound we didn't document particular steps
to trigger XID wraparound. I don't recall encountering such examples
in the documentation, so I don't think we should add them here, at
least for consistency.

All in all the patch seems to be as good as it will get. I suggest merging it.

--
Best regards,
Aleksander Alekseev

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bharath Rupireddy 2023-11-16 13:41:41 Do away with a few backwards compatibility macros
Previous Message Amul Sul 2023-11-16 13:35:29 Re: ALTER COLUMN ... SET EXPRESSION to alter stored generated column's expression