plpython: Remove duplicate PyModule_Create()
authorPeter Eisentraut <peter@eisentraut.org>
Thu, 15 Jan 2026 09:24:49 +0000 (10:24 +0100)
committerPeter Eisentraut <peter@eisentraut.org>
Thu, 15 Jan 2026 09:32:41 +0000 (10:32 +0100)
This seems to have existed like this since Python 3 support was
added (commit dd4cd55c158), but it's unclear what this second call is
supposed to accomplish.

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

src/pl/plpython/plpy_plpymodule.c

index 0d663ac5110644ec422e065af04ea66d2f0d31c0..72867388653a92678225653c47a687d727d10d01 100644 (file)
@@ -151,8 +151,6 @@ PLy_init_plpy(void)
    PLy_subtransaction_init_type();
    PLy_cursor_init_type();
 
-   PyModule_Create(&PLy_module);
-
    /*
     * initialize main module, and add plpy
     */