Re: alert clients when prepared statements are deallocated

From: Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: alert clients when prepared statements are deallocated
Date: 2026-06-04 23:56:04
Message-ID: CAOYmi+ndz7Dx5WdJu8zRPXLsA6U56jvcKnoT=ru2DhQtOKy=eA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jun 3, 2026 at 2:17 PM Nathan Bossart <nathandbossart(at)gmail(dot)com> wrote:
> Hm. So there's actually a pretty obvious problem here. Say a user
> executes something like PQsendQuery(conn, "DISCARD ALL") and then tries to
> execute an lo_* function (modified to use prepared statements) prior to
> consuming the result. In that case, the callback won't be called in time
> and the LO function will fail.

Are you allowed to call lo_*/PQfn() in the middle of an operation like
that? I.e. does it work today?

--Jacob

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Chao Li 2026-06-05 00:35:56 Re: Fix bug of CHECK constraint enforceability recursion
Previous Message Andrey Chernyy 2026-06-04 23:46:42 [PATCH] xml2: Fix stylesheet document leak in xslt_process()