diff options
author | Tom Lane | 2025-04-27 15:43:02 +0000 |
---|---|---|
committer | Tom Lane | 2025-04-27 15:43:02 +0000 |
commit | 2311f193ea7db23f68f5471ae2c35940fc0d4794 (patch) | |
tree | cb11f54c0357ead1bfc291d3a42fff964574032f /src/pl/plpython/plpy_main.c | |
parent | e8ca9ed1d260e214f02f7f5464f125fe86e55597 (diff) |
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 <[email protected]>
Author: Tom Lane <[email protected]>
Reviewed-by: Bertrand Drouvot <[email protected]>
Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src/pl/plpython/plpy_main.c')
-rw-r--r-- | src/pl/plpython/plpy_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pl/plpython/plpy_main.c b/src/pl/plpython/plpy_main.c index 8f56155f006..f36eadbadc6 100644 --- a/src/pl/plpython/plpy_main.c +++ b/src/pl/plpython/plpy_main.c @@ -18,7 +18,7 @@ #include "plpy_plpymodule.h" #include "plpy_procedure.h" #include "plpy_subxactobject.h" -#include "plpython.h" +#include "plpy_util.h" #include "utils/guc.h" #include "utils/memutils.h" #include "utils/rel.h" |