From 4a547fed9b6c09b396861f195e8fefff76040c84 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Sat, 21 Sep 2024 22:25:52 +0200 Subject: [PATCH 3/5] Remove unused #include's from pl .c files as determined by IWYU --- src/pl/plperl/plperl.c | 1 - src/pl/plpgsql/src/pl_comp.c | 3 +-- src/pl/plpgsql/src/pl_exec.c | 5 ----- src/pl/plpython/plpy_cursorobject.c | 2 -- src/pl/plpython/plpy_exec.c | 4 +--- src/pl/plpython/plpy_planobject.c | 1 - src/pl/plpython/plpy_plpymodule.c | 3 --- src/pl/plpython/plpy_procedure.c | 3 --- src/pl/plpython/plpy_spi.c | 3 --- src/pl/plpython/plpy_util.c | 1 - src/pl/tcl/pltcl.c | 3 +-- 11 files changed, 3 insertions(+), 26 deletions(-) diff --git a/src/pl/plperl/plperl.c b/src/pl/plperl/plperl.c index fe719935c67..1b1677e333b 100644 --- a/src/pl/plperl/plperl.c +++ b/src/pl/plperl/plperl.c @@ -24,7 +24,6 @@ #include "executor/spi.h" #include "funcapi.h" #include "miscadmin.h" -#include "nodes/makefuncs.h" #include "parser/parse_type.h" #include "storage/ipc.h" #include "tcop/tcopprot.h" diff --git a/src/pl/plpgsql/src/pl_comp.c b/src/pl/plpgsql/src/pl_comp.c index f1bce708d62..5633e3c7905 100644 --- a/src/pl/plpgsql/src/pl_comp.c +++ b/src/pl/plpgsql/src/pl_comp.c @@ -23,7 +23,7 @@ #include "catalog/pg_type.h" #include "funcapi.h" #include "nodes/makefuncs.h" -#include "parser/parse_type.h" +#include "parser/parse_node.h" #include "plpgsql.h" #include "utils/builtins.h" #include "utils/fmgroids.h" @@ -31,7 +31,6 @@ #include "utils/lsyscache.h" #include "utils/memutils.h" #include "utils/regproc.h" -#include "utils/rel.h" #include "utils/syscache.h" #include "utils/typcache.h" diff --git a/src/pl/plpgsql/src/pl_exec.c b/src/pl/plpgsql/src/pl_exec.c index ea9740e3f89..b51b3d13a08 100644 --- a/src/pl/plpgsql/src/pl_exec.c +++ b/src/pl/plpgsql/src/pl_exec.c @@ -19,11 +19,9 @@ #include "access/detoast.h" #include "access/htup_details.h" -#include "access/transam.h" #include "access/tupconvert.h" #include "catalog/pg_proc.h" #include "catalog/pg_type.h" -#include "commands/defrem.h" #include "executor/execExpr.h" #include "executor/spi.h" #include "executor/tstoreReceiver.h" @@ -34,13 +32,10 @@ #include "optimizer/optimizer.h" #include "parser/parse_coerce.h" #include "parser/parse_type.h" -#include "parser/scansup.h" #include "plpgsql.h" #include "storage/proc.h" #include "tcop/cmdtag.h" #include "tcop/pquery.h" -#include "tcop/tcopprot.h" -#include "tcop/utility.h" #include "utils/array.h" #include "utils/builtins.h" #include "utils/datum.h" diff --git a/src/pl/plpython/plpy_cursorobject.c b/src/pl/plpython/plpy_cursorobject.c index 24f2ac8c46b..6108384c9a5 100644 --- a/src/pl/plpython/plpy_cursorobject.c +++ b/src/pl/plpython/plpy_cursorobject.c @@ -8,14 +8,12 @@ #include -#include "access/xact.h" #include "catalog/pg_type.h" #include "mb/pg_wchar.h" #include "plpy_cursorobject.h" #include "plpy_elog.h" #include "plpy_main.h" #include "plpy_planobject.h" -#include "plpy_procedure.h" #include "plpy_resultobject.h" #include "plpy_spi.h" #include "plpython.h" diff --git a/src/pl/plpython/plpy_exec.c b/src/pl/plpython/plpy_exec.c index 157229e96f6..9d59473d6ad 100644 --- a/src/pl/plpython/plpy_exec.c +++ b/src/pl/plpython/plpy_exec.c @@ -18,10 +18,8 @@ #include "plpy_procedure.h" #include "plpy_subxactobject.h" #include "plpython.h" -#include "utils/builtins.h" -#include "utils/lsyscache.h" +#include "utils/fmgrprotos.h" #include "utils/rel.h" -#include "utils/typcache.h" /* saved state for a set-returning function */ typedef struct PLySRFState diff --git a/src/pl/plpython/plpy_planobject.c b/src/pl/plpython/plpy_planobject.c index ec2439c6a1f..bbef889329e 100644 --- a/src/pl/plpython/plpy_planobject.c +++ b/src/pl/plpython/plpy_planobject.c @@ -7,7 +7,6 @@ #include "postgres.h" #include "plpy_cursorobject.h" -#include "plpy_elog.h" #include "plpy_planobject.h" #include "plpy_spi.h" #include "plpython.h" diff --git a/src/pl/plpython/plpy_plpymodule.c b/src/pl/plpython/plpy_plpymodule.c index fa08f0dbfb3..ea06d9a52b1 100644 --- a/src/pl/plpython/plpy_plpymodule.c +++ b/src/pl/plpython/plpy_plpymodule.c @@ -6,11 +6,9 @@ #include "postgres.h" -#include "access/xact.h" #include "mb/pg_wchar.h" #include "plpy_cursorobject.h" #include "plpy_elog.h" -#include "plpy_main.h" #include "plpy_planobject.h" #include "plpy_plpymodule.h" #include "plpy_resultobject.h" @@ -18,7 +16,6 @@ #include "plpy_subxactobject.h" #include "plpython.h" #include "utils/builtins.h" -#include "utils/snapmgr.h" HTAB *PLy_spi_exceptions = NULL; diff --git a/src/pl/plpython/plpy_procedure.c b/src/pl/plpython/plpy_procedure.c index ba7786d31c3..c35a3b801ab 100644 --- a/src/pl/plpython/plpy_procedure.c +++ b/src/pl/plpython/plpy_procedure.c @@ -7,7 +7,6 @@ #include "postgres.h" #include "access/htup_details.h" -#include "access/transam.h" #include "catalog/pg_proc.h" #include "catalog/pg_type.h" #include "funcapi.h" @@ -17,8 +16,6 @@ #include "plpython.h" #include "utils/builtins.h" #include "utils/hsearch.h" -#include "utils/inval.h" -#include "utils/lsyscache.h" #include "utils/memutils.h" #include "utils/syscache.h" diff --git a/src/pl/plpython/plpy_spi.c b/src/pl/plpython/plpy_spi.c index ff87b27de09..bcbd07b70ae 100644 --- a/src/pl/plpython/plpy_spi.c +++ b/src/pl/plpython/plpy_spi.c @@ -8,7 +8,6 @@ #include -#include "access/htup_details.h" #include "access/xact.h" #include "catalog/pg_type.h" #include "executor/spi.h" @@ -18,12 +17,10 @@ #include "plpy_main.h" #include "plpy_planobject.h" #include "plpy_plpymodule.h" -#include "plpy_procedure.h" #include "plpy_resultobject.h" #include "plpy_spi.h" #include "plpython.h" #include "utils/memutils.h" -#include "utils/syscache.h" static PyObject *PLy_spi_execute_query(char *query, long limit); static PyObject *PLy_spi_execute_fetch_result(SPITupleTable *tuptable, diff --git a/src/pl/plpython/plpy_util.c b/src/pl/plpython/plpy_util.c index 22e2a599ad9..6d89b1cb60a 100644 --- a/src/pl/plpython/plpy_util.c +++ b/src/pl/plpython/plpy_util.c @@ -10,7 +10,6 @@ #include "plpy_elog.h" #include "plpy_util.h" #include "plpython.h" -#include "utils/memutils.h" /* * Convert a Python unicode object to a Python string/bytes object in diff --git a/src/pl/tcl/pltcl.c b/src/pl/tcl/pltcl.c index e2ccaa84f3f..80de0db40de 100644 --- a/src/pl/tcl/pltcl.c +++ b/src/pl/tcl/pltcl.c @@ -25,13 +25,12 @@ #include "funcapi.h" #include "mb/pg_wchar.h" #include "miscadmin.h" -#include "nodes/makefuncs.h" #include "parser/parse_func.h" #include "parser/parse_type.h" #include "pgstat.h" -#include "tcop/tcopprot.h" #include "utils/acl.h" #include "utils/builtins.h" +#include "utils/guc.h" #include "utils/lsyscache.h" #include "utils/memutils.h" #include "utils/regproc.h" -- 2.47.0