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 1wRvo0-002oew-0T for pgsql-hackers@arkaria.postgresql.org; Tue, 26 May 2026 17:43:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wRvnx-005TlA-2r for pgsql-hackers@arkaria.postgresql.org; Tue, 26 May 2026 17:43:02 +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 1wRvnx-005Tl2-1v for pgsql-hackers@lists.postgresql.org; Tue, 26 May 2026 17:43:02 +0000 Received: from mail-qv1-xf32.google.com ([2607:f8b0:4864:20::f32]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wRvnw-00000000tLc-0YYx for pgsql-hackers@postgresql.org; Tue, 26 May 2026 17:43:00 +0000 Received: by mail-qv1-xf32.google.com with SMTP id 6a1803df08f44-8ca12973e15so147930746d6.1 for ; Tue, 26 May 2026 10:42:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1779817378; cv=none; d=google.com; s=arc-20240605; b=Y91nIhyqjIBsQ16Gslz8I76elBwwWW6c2nd7qopL6EgnLB94OCejm7B5muBoHdWCBX BKnb1830Mt2KSjtO7/xnjax6VGC0iQVagIpoT+VqZ6tUInL4niBspwpN+rHh2gyC9wuY fNA1VSDShqqDdT5YpKwiJ1iZ2du26rZPInzsNJZC2UEBgGwytUGwZR82YbK+IBHaBx0E A3pbwk8zk6dbqZlqrDA1vJdPjfn1i4l+RT2EOkfXwPecIisvEKOxpDkmuVckv05fhxTa emC8+SCMmItmogaK6/klmKcs2kGGO4/8rN2LwG91GnLE+2+R/Z+pwOV59idu9sSZ9W/k aGeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=8v/yImTDx9dLmAfPshaek1M6uJa4du6wNHpCaU1v66M=; fh=GB7TmI7M6Y28qT2ZDqtrTWnAHNonaFJx+hcppf1fpwA=; b=QkG40efB7na4mdltKyc7r0vytMo1W4X8kR+dApUF433Bf8WiwoWGFGs+waK5LL7xX0 FdwFqEVZLexLNI8V3N7WeDoQfCIjh9ofGU7TE+uxUtXNW5IwtwxqsCXJBTRznawtThSo Rl3GKOnZoRdCoHyKh9+8UOsS4rVFuugl4bhkITeM/VnccCH6HRF5uwXqgL+6Bq7qtyyo FztEfRnw7O2Hh/j7ht45Gwv45zu1zpKPaSQB4zRxWawUBPkI5zxO0yInntugFYiaVr9T kkpZ7MuZ1meUs7RXJcAv0qiFHoQgQrdj3jEQuHugqVHsDejt2IDKhkOnNJ59g0UBocEM 4Nwg==; darn=postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; t=1779817378; x=1780422178; darn=postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=8v/yImTDx9dLmAfPshaek1M6uJa4du6wNHpCaU1v66M=; b=Bpcz4I/YKVejWigE8ZaHswjKRT615jFnUMurRAPLN+Rt/ItFvoI91moDZ36Z6BE1UI k2fq5m/i131ZrH4Z9X4F4LwX0o5HKwLjAe1kUKwXhFBByeBJuHEBeRpah58c6S1mLBMn Vr1W7Vxj/tnWkYT0L1FrEKD0oAmUSzrbxeEF70MXBK3WWavqxCeZJNb8KqPLEblT3lmQ EWj52G6vUKMvInpHlgA35u5zqg/Fwl1W5pjrsarOYwvTS8KHDc0qx5Gr8KiIvFBkg8Lo wCdFDb0/Hx0rOgzHREz/3akfQnldlI3IbbhzqO410bcuNUpsSeI1MJFein35ACoYKB6v p7vA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779817378; x=1780422178; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=8v/yImTDx9dLmAfPshaek1M6uJa4du6wNHpCaU1v66M=; b=saJZWSvEAvio7zJuuqCrpX0SGUqmr7Gsh5eAR5zJ5Ob4Y7Ao0sLUH0euJNRc5kR9F0 Do1/NOXT2RFTzzkmdgdyFwvJRJsZPdVKM+Ki3YgaHgy/849weIxUNBOvbwe+93HILlWo +k1i6bVVap4Zp7/AqFzXaVfSbFkhnke7nnM+kMTSl4qZ+T99blVB26mOrCzeA5T+bSSk WkZZ6b1p7PKwhzJscl26mbr08sAQc+jmFIq+5usxqfhtKG+DPf5cU9ZO/CTKHShb49nG UuD03UaltY32sfbWyju8zezZ4ShYaMseyPZkWPhlzbaQo/y1B+WGbdfI73rxtLczutBs LdfA== X-Gm-Message-State: AOJu0YyDlu/eBO5kwHG1GyjXhQ7hjdA38aGmLL7CBoTsXF35q/xnGEyb pgivJpCBwGrFQPceBu0Qfygd6LPy3oxoWxYXGIrJ4KRSIuwGTbFPblwN0U91ITU8A/xzW2vIfiK dkjNQkOKzRlxQtgvi8FIGATUWkYrHHOLc4b/bxmeS1J2Cjoh1IgSYLvK3 X-Gm-Gg: Acq92OG5RGzKY4PYr2uPMi/YL79CjsLq2zBs/aL0O6SSWJ2vfDTUvU8dM0A5e9oNDiQ gITRyOFjCQgR2P12F3caaEC+vcCEDxoh0vzwT+K5wwtAdP9NgYGymeo1zmatvKfXXfKqHHA3Tsw jP8ic2AJ4jc2rVNg8/A57Zk4a9RvzJ39UqOV7U3T8mkK2ZMpreuAdse6HPMy6rawjHy/hbooafY /Qp9oYsWCSKQDX3zxVvqf2wye6qcOOhvnkzpamR3+fhVRcCVCn66jR3bAUPVeGWAyLytiskPQsd 7BH6btk1Ew== X-Received: by 2002:a05:6214:301e:b0:8ac:b2e1:37a4 with SMTP id 6a1803df08f44-8cc7b673a74mr328200646d6.25.1779817378022; Tue, 26 May 2026 10:42:58 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jacob Champion Date: Tue, 26 May 2026 10:42:47 -0700 X-Gm-Features: AVHnY4JD9_NH8TNHZ0mMy8xdgBJLm0pCwXoB7gxLdyUY6_VO0tW8LmP7K2mSYdc Message-ID: Subject: Re: future of PQfn() To: Nathan Bossart Cc: pgsql-hackers@postgresql.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, May 26, 2026 at 9:05=E2=80=AFAM Nathan Bossart wrote: > Given the above, I'd like to propose retiring PQfn() in v20. Since it's = an > exported symbol, we can't just delete the code, but we could have it > unconditionally error. That seems reasonable to me. (We may want to exercise the PqMsg_FunctionCall message more explicitly in our test suite at the same time we do that...) > Assuming folks are okay with that, I'm wondering > what we should do with the relevant documentation. Should we leave a stu= b > with a note about its removal, or should we just wipe all mentions? I'm > currently leaning towards leaving a note, but I could see the argument > that's not even worth doing given the lack of uptake. I think we can probably wipe it out, personally. > The other question is what to do with the frontend LO code. The simplest > thing we can do is to leave PQnfn() around as an internal function that i= s > only used by this interface. Alternatively, we could take our own advice > and used a prepared statement with binary transmission of params/results, > but that has two key problems: 1) potential name collisions with > user-created prepared statements and 2) breakage after DISCARD/DEALLOCATE= , > which I haven't come up with a good way to deal with. Another approach w= e > could take is to just send the query via PQexecParams(), but a simple tes= t > (creating and unlinking 10K LOs) showed a ~41% slowdown compared to HEAD. > So, I guess we'll need to keep PQnfn() around for now... 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? --Jacob