Re: Fix failing assert in deferred constraint trigger

From: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Fabrizio Mello <fabrizio(at)planetscale(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Fix failing assert in deferred constraint trigger
Date: 2026-09-11 02:32:34
Message-ID: 8080BBBA-302F-4454-9A20-9535A6F45C7D@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On Sep 11, 2026, at 09:44, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>
> On Wed, Sep 9, 2026 at 12:51 PM Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>> One comment: isn't it be better to add a test for exception handling
>> in a deferred constraint trigger at COMMIT? For example, in triggers.sql:
>
> I've added this test. Attached is the updated version of the patch.
>
> BTW, I found that Patrick Reynolds <patrick(at)piki(dot)org> is listed in the
> From field of the patch. Does that mean he is the author of the patch,
> rather than you? I'm just asking because I need to know who to list in the
> Author tag of the commit message.
>
> Regards,
>
> --
> Fujii Masao
> <v2-0001-Fix-failing-assert-in-deferred-constraint-trigger.patch>

V2 LGTM.

One nitpick is that, the fix covers both COMMIT and PREPARE TRANSACTION, but v2 only adds a regression test for the COMMIT case. Should we test both paths?

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2026-09-11 02:46:00 Re: Add PRODUCT() aggregate function
Previous Message Tom Lane 2026-09-11 02:31:39 Re: Add PRODUCT() aggregate function