Thread: pgsql: Split plpython.c into smaller pieces

pgsql: Split plpython.c into smaller pieces

From
Peter Eisentraut
Date:
Split plpython.c into smaller pieces

This moves the code around from one huge file into hopefully logical
and more manageable modules.  For the most part, the code itself was
not touched, except: PLy_function_handler and PLy_trigger_handler were
renamed to PLy_exec_function and PLy_exec_trigger, because they were
not actually handlers in the PL handler sense, and it makes the naming
more similar to the way PL/pgSQL is organized.  The initialization of
the procedure caches was separated into a new function
init_procedure_caches to keep the hash tables private to
plpy_procedures.c.

Jan Urbański and Peter Eisentraut

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/147c2482542868d1f9dcf7d2ecfeac58d845335c

Modified Files
--------------
src/pl/plpython/Makefile             |   16 +-
src/pl/plpython/nls.mk               |    3 +-
src/pl/plpython/plpy_cursorobject.c  |  492 +++
src/pl/plpython/plpy_cursorobject.h  |   22 +
src/pl/plpython/plpy_elog.c          |  428 +++
src/pl/plpython/plpy_elog.h          |   24 +
src/pl/plpython/plpy_exec.c          |  859 ++++++
src/pl/plpython/plpy_exec.h          |   13 +
src/pl/plpython/plpy_main.c          |  325 ++
src/pl/plpython/plpy_main.h          |   13 +
src/pl/plpython/plpy_planobject.c    |  128 +
src/pl/plpython/plpy_planobject.h    |   26 +
src/pl/plpython/plpy_plpymodule.c    |  417 +++
src/pl/plpython/plpy_plpymodule.h    |   19 +
src/pl/plpython/plpy_procedure.c     |  531 ++++
src/pl/plpython/plpy_procedure.h     |   52 +
src/pl/plpython/plpy_resultobject.c  |  180 ++
src/pl/plpython/plpy_resultobject.h  |   20 +
src/pl/plpython/plpy_spi.c           |  559 ++++
src/pl/plpython/plpy_spi.h           |   25 +
src/pl/plpython/plpy_subxactobject.c |  217 ++
src/pl/plpython/plpy_subxactobject.h |   29 +
src/pl/plpython/plpy_typeio.c        | 1038 +++++++
src/pl/plpython/plpy_typeio.h        |  107 +
src/pl/plpython/plpy_util.c          |  125 +
src/pl/plpython/plpy_util.h          |   21 +
src/pl/plpython/plpython.c           | 5439 ----------------------------------
src/pl/plpython/plpython.h           |  156 +
28 files changed, 5842 insertions(+), 5442 deletions(-)