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