pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrey Rachitskiy <pl0h0yp1@gmail.com>
Cc: andrew@dunslane.net
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Residual cleanups for tied objects in PL/Perl
Date: Mon, 17 Aug 2026 11:41:36 -0400
Message-ID: <756684.1786981296@sss.pgh.pa.us> (raw)
In-Reply-To: <CAB8bMivZFmWh9vvkF5HBT+Cy9y=nA2NbGhxQapGPUaZ-mNerSA@mail.gmail.com>
References: <569769.1786901901@sss.pgh.pa.us>
	<CAB8bMivzt9CGJWM--i3V5MUSXL2FSK2b1DPiJYow2rd9y6pu9A@mail.gmail.com>
	<579928.1786912017@sss.pgh.pa.us>
	<CAB8bMisdLJVgRt5nvUfU=ivCG6V778x225m93fwKXcq2zFvA-w@mail.gmail.com>
	<CAB8bMisM-qSPw2qVnyjTp862LVAKpfX33_y-H1MBGzjAfwAQcg@mail.gmail.com>
	<CAB8bMivZFmWh9vvkF5HBT+Cy9y=nA2NbGhxQapGPUaZ-mNerSA@mail.gmail.com>

Andrey Rachitskiy <pl0h0yp1@gmail.com> writes:
> I have attached v2.

v2 looks like a bunch of very random changes.  I would like to see
more consistency in the code, ie exactly one pattern for iterating
through hashes and exactly one pattern for iterating through arrays.
We'd not have had the original infinite-loop problem in the first
place if plperl_func_handler() hadn't seen fit to use av_fetch() in a
way randomly different from every other usage.  We still have multiple
patterns for iterating through hashes: why do a couple of places use
hv_iternextsv when the others don't?  And why do we use hek2cstr
in some places and not others?

(oh, and for extra credit: why is there a second call of hv_iterinit
in plperl_build_tuple_result and plperl_modify_tuple?)

I think we'd be well advised to clean up that inconsistency, and then
inject tied-object handling in the same way in each loop.

			regards, tom lane





view thread (29+ messages)  latest in thread

Message-ID: <756684.1786981296@sss.pgh.pa.us>
Permalink:  ../756684.1786981296@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/756684.1786981296@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, pl0h0yp1@gmail.com, andrew@dunslane.net, pgsql-hackers@lists.postgresql.org
  Subject: Re: Residual cleanups for tied objects in PL/Perl
  In-Reply-To: <756684.1786981296@sss.pgh.pa.us>

* 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