Re: Residual cleanups for tied objects in PL/Perl

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Residual cleanups for tied objects in PL/Perl
Date: 2026-08-16 19:04:30
Message-ID: 574948.1786907070@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan <andrew(at)dunslane(dot)net> 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message mailinglists 2026-08-16 19:26:41 Re: pg_upgrade from pg19 source build to pg19-beta3 throws an error
Previous Message Andrew Dunstan 2026-08-16 18:47:47 Re: Residual cleanups for tied objects in PL/Perl