Re: plpython: Remove support for major version conflict detection
Mario Gonzalez <gonzalemario@gmail.com>
From: Mario González Troncoso <gonzalemario@gmail.com>
To: Peter Eisentraut <peter@eisentraut.org>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2025-10-08T15:28:45Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
plpython: Remove support for major version conflict detection
- 594ba21bce05 19 (unreleased) landed
-
Avoid dump/reload problems when using both plpython2 and plpython3.
- 866566a690bb 9.6.0 cited
Attachments
- 0001-plpython-Remove-support-for-major-version-conflict-d.patch (text/x-patch) patch 0001
I'm attaching the same patch after rebasing from master. I had to just change this in src/pl/plpython/plpy_main.c - static bool PLy_procedure_is_trigger(Form_pg_proc procStruct); + static PLyTrigType PLy_procedure_is_trigger(Form_pg_proc procStruct); Now the function returns PLyTrigType instead of a bool. lgtm On Wed, 8 Oct 2025 at 12:19, Peter Eisentraut <peter@eisentraut.org> wrote: > > This essentially reverts commit 866566a690b, which installed safeguards > against loading plpython2 and plpython3 into the same process. We don't > support plpython2 anymore, so this is obsolete. > > The Python and PL/Python initialization now happens again in _PG_init() > rather than the first time a PL/Python call handler is invoked. (Often, > these will be very close together.) > > I kept the separate PLy_initialize() function introduced by 866566a690b > to keep _PG_init() a bit modular. > > (I'm looking at the some further work to allow multiple interpreters in > PL/Python, so I'm trying to clean up the initialization code a bit first.) -- https://www.linkedin.com/in/gonzalemario