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 1wvg9x-001RG0-1P for pgsql-hackers@arkaria.postgresql.org; Sun, 16 Aug 2026 19:04:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wvg9t-006rYs-31 for pgsql-hackers@arkaria.postgresql.org; Sun, 16 Aug 2026 19:04:39 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wvg9t-006rYj-25 for pgsql-hackers@lists.postgresql.org; Sun, 16 Aug 2026 19:04:38 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wvg9o-000000015t6-2LFV for pgsql-hackers@lists.postgresql.org; Sun, 16 Aug 2026 19:04:38 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.18.1/8.18.1) with ESMTP id 67GJ4U76574949; Sun, 16 Aug 2026 15:04:30 -0400 From: Tom Lane To: Andrew Dunstan cc: pgsql-hackers@lists.postgresql.org Subject: Re: Residual cleanups for tied objects in PL/Perl In-reply-to: <7e5de9c1-e2fe-44d2-9df3-670c6678e52b@dunslane.net> References: <569769.1786901901@sss.pgh.pa.us> <7e5de9c1-e2fe-44d2-9df3-670c6678e52b@dunslane.net> Comments: In-reply-to Andrew Dunstan message dated "Sun, 16 Aug 2026 14:47:47 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <574947.1786907070.1@sss.pgh.pa.us> Date: Sun, 16 Aug 2026 15:04:30 -0400 Message-ID: <574948.1786907070@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andrew Dunstan writes: > On 2026-08-16 Su 1:38 PM, Tom Lane wrote: >> The test cases I have that reach these bugs require Perl "Tie" >> modules that aren't present in common Perl installations, >> so I'm not planning on trying to construct regression test >> entries for them. But I've attached two SQL scripts that >> cause failures without the patch. > Which modules? At least Tie::Array isn't present in RHEL10's standard perl package set --- I had to install "perl-Tie" to get that test case to run here. >> One interesting point is that Claude Opus, which constructed >> these test cases, seemed to think that we ought to be able >> to read out the values assigned to the tied array or hash. >> But what the repaired code actually produces is SQL NULLs. >> AFAICT we are getting Perl "undef" values out of hv_iternext >> or av_fetch, so it's hard to see how we could do any better. > At first glance I'm inclined to agree with Opus. If we can make it work, I'm all for that, but I wonder how many other places have the same issue. regards, tom lane