postgres/contrib/jsonb_plpython
Tom Lane 2311f193ea Remove circular #include's between plpython.h and plpy_util.h.
plpython.h included plpy_util.h, simply on the grounds that "it's
easier to just include it everywhere".  However, plpy_util.h must
include plpython.h, or it won't pass headerscheck.  While the
resulting circularity doesn't have any immediate bad effect,
it's poor design.  We have seen serious messes arise in the past
from overly-broad inclusion footprints created by such circularities,
so let's establish a project policy against it.

To fix, just replace *.c files' inclusions of plpython.h with
plpy_util.h.  They'll pull in plpython.h indirectly; indeed, almost
all have already done so via inclusions of other plpy_xxx.h headers.
(Any extensions using plpython.h can do likewise without breaking
the compatibility of their code with prior Postgres versions.)

Reported-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Author: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Discussion: https://postgr.es/m/aAxQ6fcY5QQV1lo3@ip-10-97-1-34.eu-west-3.compute.internal
2025-04-27 11:43:02 -04:00
..
expected plpython: Remove regression test infrastructure for Python 2. 2022-03-07 18:20:51 -08:00
sql plpython: Remove regression test infrastructure for Python 2. 2022-03-07 18:20:51 -08:00
.gitignore plpython: Remove regression test infrastructure for Python 2. 2022-03-07 18:20:51 -08:00
jsonb_plpython.c Remove circular #include's between plpython.h and plpy_util.h. 2025-04-27 11:43:02 -04:00
jsonb_plpython3u--1.0.sql Transforms for jsonb to PL/Python 2018-03-28 08:37:18 -04:00
jsonb_plpython3u.control Transforms for jsonb to PL/Python 2018-03-28 08:37:18 -04:00
Makefile plpython: Remove regression test infrastructure for Python 2. 2022-03-07 18:20:51 -08:00
meson.build Update copyright for 2025 2025-01-01 11:21:55 -05:00