Re: Deferred constraint trigger semantics

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Bryn Llewellyn <bryn(at)yugabyte(dot)com>
Cc: pgsql-general list <pgsql-general(at)lists(dot)postgresql(dot)org>, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Subject: Re: Deferred constraint trigger semantics
Date: 2022-05-11 01:19:47
Message-ID: CAKFQuwYOODg0425rLvTQ8EM3RcoiDiGEHYiBSJBAf4gXWOwOuA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, May 10, 2022 at 5:47 PM Bryn Llewellyn <bryn(at)yugabyte(dot)com> wrote:

>
> INFO: trg fired. new.v = 80, n = 8
>
> It shows the expected "new" value each time it fires. And yet the query
> reflects the table content on statement completion. This seems to be very
> strange.
>

From the documentation:

"Row-level BEFORE triggers fire immediately before a particular row is
operated on, while row-level AFTER triggers fire at the end of the
statement (but before any statement-level AFTER triggers)."

https://www.postgresql.org/docs/current/trigger-definition.html

David J.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bryn Llewellyn 2022-05-11 02:52:32 Re: Deferred constraint trigger semantics
Previous Message Bryn Llewellyn 2022-05-11 00:46:59 Deferred constraint trigger semantics