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 13:48:32
Message-ID: CABo-N96ET3b=bKGSyQ4EVew=MHo=qc5dyQ90BEABLcrrTna+wg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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!

--
Fabrízio Mello
PlanetScale Postgres Core Team

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2026-09-11 14:08:35 Re: pg_get_*_ddl() needs a redesign
Previous Message Fabrizio Mello 2026-09-11 13:43:33 Re: Fix failing assert in deferred constraint trigger