Re: [PATCH v1] plpython: Pair SPI_connect and SPI_finish in the same function - Mailing list pgsql-hackers

From Xing Guo
Subject Re: [PATCH v1] plpython: Pair SPI_connect and SPI_finish in the same function
Date
Msg-id CACpMh+CZEd5wSbjQmOFE6epvc+7DAgVBOtGh6kxdbhOtxf7CBw@mail.gmail.com
Whole thread
List pgsql-hackers
Hi hackers,

I cleaned up one more obsolete comment about SPI_connect(). New patch
is attached.


Best Regards,
Xing







On Tue, Jul 14, 2026 at 4:52 PM Xing Guo <higuoxing@gmail.com> wrote:
>
> Hi hackers,
>
> While reading PL/Python's source code, I spotted that PL/Python's
> call_handler and inline_handler call SPI_connect_ext(), but
> SPI_finish() is called inside different execution functions in
> plpy_exec.c. It's easy to miss SPI_finish() call when adding a new
> execution path for PL/Python.
>
> I created a patch to move these SPI_finish() calls to pair with
> SPI_connect in the same function.
>
> Best Regards,
> Xing

pgsql-hackers by date:

Previous
From: ayoub.kazar@data-bene.io
Date:
Subject: Re: [PATCH] Rewrite undirected edge patterns in GRAPH_TABLE using UNION ALL
Next
From: Tomas Vondra
Date:
Subject: Re: PGLZ Compression Optimization