Re: Trigger violates foreign key constraint

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Trigger violates foreign key constraint
Date: 2023-10-03 07:24:47
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Mon, 2023-10-02 at 09:49 -0400, Tom Lane wrote:
> This is by design: triggers operate at a lower level than
> foreign keys, so an ill-conceived trigger can break an FK constraint.
> That's documented somewhere, though maybe not visibly enough.

Not having found any documentation, I propose the attached caution.

Laurenz Albe

Attachment Content-Type Size
0001-Document-foreign-key-internals.patch text/x-patch 1.4 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2023-10-03 07:30:09 Re: [PGDOCS] Inconsistent linkends to "monitoring" views.
Previous Message Michael Paquier 2023-10-03 07:20:45 Re: Incorrect handling of OOM in WAL replay leading to data loss