plpython: Clean up PyModule_AddObject() uses
Peter Eisentraut <peter@eisentraut.org>
Author:
Peter Eisentraut <peter@eisentraut.org>
Date: 2026-01-15T09:32:38Z
Releases:
19 (unreleased)
plpython: Clean up PyModule_AddObject() uses The comments "PyModule_AddObject does not add a refcount to the object, for some odd reason" seem distracting. Arguably, this behavior is expected, not odd. Also, the additional references created by the existing code are apparently not necessary. But we should clean up the reference in the error case, as suggested by the Python documentation. Reviewed-by: Chao Li <li.evan.chao@gmail.com> Reviewed-by: Matheus Alcantara <matheusssilv97@gmail.com> Reviewed-by: li carol <carol.li2025@outlook.com> Reviewed-by: Kirill Reshke <reshkekirill@gmail.com> Discussion: https://www.postgresql.org/message-id/f31333f1-fbb7-4098-b209-bf2d71fbd4f3%40eisentraut.org
Files
| Path | Change | +/− |
|---|---|---|
| src/pl/plpython/plpy_plpymodule.c | modified | +22 −21 |
Discussion
- PL/Python initialization cleanup 10 messages · 2025-12-31 → 2026-01-15