pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathandbossart@gmail.com>
To: Jacob Champion <jacob.champion@enterprisedb.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: future of PQfn()
Date: Tue, 26 May 2026 14:55:09 -0500
Message-ID: <ahX6nb1aqh51IhHC@nathan> (raw)
In-Reply-To: <CAOYmi+m3bKWfHhAj3iKBa3mKj=_4MO3xY2WpBsB4Hx7yyAE7rw@mail.gmail.com>
References: <ahXE28klgxIJXBLq@nathan>
	<CAOYmi+m3bKWfHhAj3iKBa3mKj=_4MO3xY2WpBsB4Hx7yyAE7rw@mail.gmail.com>

On Tue, May 26, 2026 at 10:42:47AM -0700, Jacob Champion wrote:
> Short-term, keeping it around seems fine.
> 
> Long-term, it doesn't feel great that the alternatives we tell other
> people to use are... worse. Surely other clients of libpq run into the
> layering violation problem with prepared statements, as well?

Yup.  Here's a related note in JDBC:

	https://github.com/pgjdbc/pgjdbc/blob/cf2d89ec/docs/content/documentation/server-prepare.md?plain=1#...

I wonder how difficult it would be to teach the protocol to advise clients
when prepared statements are deallocated...

FWIW I'm less concerned about the name collision problem.  I was thinking
we could just document that libpq manages statements with a prefix like
"libpq_internal_".  Any problems in that area seem likely to be intentional
breakage that we needn't worry about.

-- 
nathan





view thread (21+ messages)  latest in thread

Message-ID: <ahX6nb1aqh51IhHC@nathan>
Permalink:  ../ahX6nb1aqh51IhHC@nathan/
Also on:    postgresql.org/message-id/ahX6nb1aqh51IhHC@nathan

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: nathandbossart@gmail.com, jacob.champion@enterprisedb.com
  Subject: Re: future of PQfn()
  In-Reply-To: <ahX6nb1aqh51IhHC@nathan>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox