Re: Fix failing assert in deferred constraint trigger

From: Fabrizio Mello <fabrizio(at)planetscale(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Fix failing assert in deferred constraint trigger
Date: 2026-09-11 16:04:12
Message-ID: CABo-N95BmJ9MtjNXmnatoMnu31c=sks0UCrKJ3HQV2jsDhrMsg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Sep 11, 2026 at 10:48 AM Fabrizio Mello
<fabrizio(at)planetscale(dot)com> wrote:
>
> On Wed, Sep 9, 2026 at 12:52 AM Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> >
> > [...]
> >
> > BTW, WITH HOLD cursor seems to be able to cause the same issue:
> >
> > CREATE FUNCTION hoge() RETURNS integer
> > LANGUAGE plpgsql VOLATILE AS $$
> > BEGIN
> > PERFORM 1 / 0;
> > RETURN 0;
> > EXCEPTION WHEN division_by_zero THEN
> > RETURN 1;
> > END;
> > $$;
> >
> > BEGIN;
> > DECLARE c NO SCROLL CURSOR WITH HOLD FOR SELECT hoge();
> > COMMIT;
> >
>
> Having a look into it thanks!
>

Confirmed that the patch works fine also with "WITH HOLD" cursor.

Regards,

--
Fabrízio Mello
PlanetScale Postgres Core Team

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Vik Fearing 2026-09-11 16:06:50 Re: Logical Implication
Previous Message Marcos Pegoraro 2026-09-11 16:03:27 Re: Support for 8-byte TOAST values, round two