From: Tom Lane <tgl@sss.pgh.pa.us>
To: shihao zhong <zhong950419@gmail.com>
Cc: Marcos Castedo <marcos.castedo@anachronics.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #19816: PL/Python SD dictionary is split by input collation in 19rc1
Date: Wed, 11 Nov 2026 12:35:21 -0500
Message-ID: <3249682.1794418521@sss.pgh.pa.us> (raw)
In-Reply-To: <3245516.1794415242@sss.pgh.pa.us>
References: <19816-921b5cbc3ee63146@postgresql.org>
<CAGRkXqSAdTj_pk3wZbjbZQU_HjB9Hj0Ybwc3J5RrFM1j7RvckA@mail.gmail.com>
<2491842.1794252108@sss.pgh.pa.us>
<CABH3EXo09nT501nbyoY+xqBXCP2gz-7gXH3vLsSYiSuWnEUR+Q@mail.gmail.com>
<CAGRkXqTCSAQZVXHUdN-u+fELdfdVc8hy8XrNVuWBrBhkRb04mg@mail.gmail.com>
<3245516.1794415242@sss.pgh.pa.us>
I wrote:
> So I'm now coming around to the conclusion that bug compatibility
> with the old behavior is the way to go. Maybe we will rethink
> that when/if we get around to supporting polymorphic arguments,
> but we don't have to make a decision about that today. If we
> split off a separate hashtable as Shihao's v1 patch does, then
> we've successfully decoupled the SD behavior from funccache.c's
> rules, and we will be free to go either way when the time comes.
> So I think Shihao's patch is the right thing (at least approximately,
> I haven't read it in detail), and I'll move forward with that.
Okay, so I started looking at the patch and immediately realized
that it's set up to replace SD any time the function is redefined.
I think that's taking bug-compatibility with the old behavior a
bit too far: you certainly would not get that impression from
the manual's description. I propose we drop that behavior and
just run with the function OID and trigger relation as hash keys.
As a minor criticism, I find it odd to make PLy_procedure_compile
sometimes create the SD dictionary and sometimes not. There are
only two callers, so I'm more inclined to require both callers
to handle that.
regards, tom lane
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, zhong950419@gmail.com, marcos.castedo@anachronics.com
Subject: Re: BUG #19816: PL/Python SD dictionary is split by input collation in 19rc1
In-Reply-To: <3249682.1794418521@sss.pgh.pa.us>
References: <19816-921b5cbc3ee63146@postgresql.org> <CAGRkXqSAdTj_pk3wZbjbZQU_HjB9Hj0Ybwc3J5RrFM1j7RvckA@mail.gmail.com> <2491842.1794252108@sss.pgh.pa.us> <CABH3EXo09nT501nbyoY+xqBXCP2gz-7gXH3vLsSYiSuWnEUR+Q@mail.gmail.com> <CAGRkXqTCSAQZVXHUdN-u+fELdfdVc8hy8XrNVuWBrBhkRb04mg@mail.gmail.com> <3245516.1794415242@sss.pgh.pa.us> <3249682.1794418521@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