Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wRxrx-002qPd-2V for pgsql-hackers@arkaria.postgresql.org; Tue, 26 May 2026 19:55:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wRxru-005mo7-1f for pgsql-hackers@arkaria.postgresql.org; Tue, 26 May 2026 19:55:15 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wRxru-005mnz-0W for pgsql-hackers@lists.postgresql.org; Tue, 26 May 2026 19:55:15 +0000 Received: from mail-oo1-xc30.google.com ([2607:f8b0:4864:20::c30]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wRxrt-00000000uG4-1clJ for pgsql-hackers@postgresql.org; Tue, 26 May 2026 19:55:14 +0000 Received: by mail-oo1-xc30.google.com with SMTP id 006d021491bc7-69b747a8984so2939005eaf.2 for ; Tue, 26 May 2026 12:55:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779825312; x=1780430112; darn=postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=5xNwEHXJ8UJ5x3isvYU7b3hC4jCFGaPOmqctR8nDSaE=; b=XY6HF9IdVvZ0sCYGJAVIoRKD0S/nwFFK4CCRWU6CdvP7q3Gi9ulvYkbDmL+PFdQRXJ 49e2OfVKFbkp/H624uvx/Tu1ak9ALQerDG523gJuYttPcfKPo32jWgtRF5OCZhlhoqwd mZU30NMZk7PA+uohngHo/sPFEq7CeCz1SPM/toqX8Gd00zlBmW2S+5ZuU7hI5UpmgPS1 /0GA0NVgTou0qa1AdHQFDnzV50N7C7JyIYb6LIuGFb2Yrhe3Qd3DrDw6Kc9CBovdXdqf cXvyrFFO7Z4VwxD2q8ewm8KH6jZ1jkx21+YWQMbrQGI74upNlBLPFiEpk5GBGu2ipdIQ 8XPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779825312; x=1780430112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5xNwEHXJ8UJ5x3isvYU7b3hC4jCFGaPOmqctR8nDSaE=; b=QNFnFu6ZE2Fdw+IatdaYBteVe6IdHu7WTc51MkQ28ryLmd0PhjBajLFx3cAntY3W2u rlcCkoa+iwgvLMoS6wzzH+eiurpnMoXQvOm1d+dZb0WVz7dbSwa3kKXhcTXoMXyZp+2D TJAJzoNLDJbMGQfIH6cHLyB2kKyv6++mPsQlb9EzuPNupAsTB5ppfNeibzKX7vFHzcUy W1CIYTqfjzU5TIjuU4SL4WgA1wFkTeA0QEcXvegecOJQNLw6v5x+uTZSynHRW/6NS6dp bx0UjDNegz7bLs0Ry5rgmqBtarc+QWaAGRtauSYlLKJSEK8mowwrhaV5ZDXveOmzzlL3 wKiQ== X-Gm-Message-State: AOJu0YxxnXYKh5w5B83uUPPgfWVyHLSjMiZpmv76ndSGJ/2vBV3PNDhS dkGaJCmSFoKlsyd0neEpffnRuh6+aBIyqw6hxkaXsgrMscU0hKS42zcu X-Gm-Gg: Acq92OFd8BmsYQK0TUJ+quRvxsVDKOgUfQvZEB+Cs7vqhfMmVGxBsoPODrbW7srUT4F ZYVkTDWFTVoW3/6fEQJLvaQoC2HNG/x8orjuqGJuaZs/YOsEerkVssikkGRPsLOa+blo982sHaM lzI/kJ9N2yiBjJQcA0INPno7ekFnOz5/3D2+LRaiaLdEyjCkyRHZM9FYhSlNJnI6/TQQrU5VO+M Pr5gzT85KthNzcz/1q8cy63CNl4mRdAC4fNl3mXePhLfu4ziMHwGMVZOQXbSyQudmMSFk9SYLJE vJwQVKVXFhmTpRmlRUrpmJfujDpdG+dtj9tmFd1fH+aP/VHPQ+t9jZGFZTR0xIZ4SHYia6QrzVK zUi1Z4rV1BAJvs42DJ+xzxhmHiAeaI+k1RanWvvezDlMDd2rdSurm7aT9L+R6hgfJIyMU7A+wI8 dw21YDCGBbC2zyT3gG9TyQXtDj7mJdsSGN8JgDlONuHddkKK5rWOY917aTn//ASHvIMSwBtuRuc r9WoM+haLVsBi9b/AwnuIMF/AudPOxP X-Received: by 2002:a4a:edce:0:b0:694:a1d1:f363 with SMTP id 006d021491bc7-69d7eb6e289mr10674201eaf.15.1779825311761; Tue, 26 May 2026 12:55:11 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-43b635d26b5sm14009475fac.6.2026.05.26.12.55.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 May 2026 12:55:11 -0700 (PDT) Date: Tue, 26 May 2026 14:55:09 -0500 From: Nathan Bossart To: Jacob Champion Cc: pgsql-hackers@postgresql.org Subject: Re: future of PQfn() Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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#L305-L315 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