diff options
| author | Amit Kapila | 2019-11-25 02:38:57 +0000 |
|---|---|---|
| committer | Amit Kapila | 2019-11-25 02:38:57 +0000 |
| commit | e0487223ecac9cbb7f673e4ff6d2e4086e591abf (patch) | |
| tree | 31eda4c126c75e7915b451cbbfb739984b68c9be /src/pl/plpython | |
| parent | 2aa84520b3508dda273b9bbffab7bf87f0d98bf8 (diff) | |
Make the order of the header file includes consistent.
Similar to commits 14aec03502, 7e735035f2 and dddf4cdc33, this commit
makes the order of header file inclusion consistent in more places.
Author: Vignesh C
Reviewed-by: Amit Kapila
Discussion: https://postgr.es/m/CALDaNm2Sznv8RR6Ex-iJO6xAdsxgWhCoETkaYX=+9DW3q0QCfA@mail.gmail.com
Diffstat (limited to 'src/pl/plpython')
| -rw-r--r-- | src/pl/plpython/plpy_cursorobject.c | 8 | ||||
| -rw-r--r-- | src/pl/plpython/plpy_elog.c | 6 | ||||
| -rw-r--r-- | src/pl/plpython/plpy_exec.c | 16 | ||||
| -rw-r--r-- | src/pl/plpython/plpy_main.c | 16 | ||||
| -rw-r--r-- | src/pl/plpython/plpy_planobject.c | 7 | ||||
| -rw-r--r-- | src/pl/plpython/plpy_plpymodule.c | 12 | ||||
| -rw-r--r-- | src/pl/plpython/plpy_procedure.c | 12 | ||||
| -rw-r--r-- | src/pl/plpython/plpy_resultobject.c | 6 | ||||
| -rw-r--r-- | src/pl/plpython/plpy_spi.c | 12 | ||||
| -rw-r--r-- | src/pl/plpython/plpy_spi.h | 3 | ||||
| -rw-r--r-- | src/pl/plpython/plpy_subxactobject.c | 10 | ||||
| -rw-r--r-- | src/pl/plpython/plpy_subxactobject.h | 3 | ||||
| -rw-r--r-- | src/pl/plpython/plpy_typeio.c | 12 | ||||
| -rw-r--r-- | src/pl/plpython/plpy_typeio.h | 3 | ||||
| -rw-r--r-- | src/pl/plpython/plpy_util.c | 10 |
15 files changed, 44 insertions, 92 deletions
diff --git a/src/pl/plpython/plpy_cursorobject.c b/src/pl/plpython/plpy_cursorobject.c index b44ce7e225f..4c37ff898c9 100644 --- a/src/pl/plpython/plpy_cursorobject.c +++ b/src/pl/plpython/plpy_cursorobject.c @@ -11,19 +11,15 @@ #include "access/xact.h" #include "catalog/pg_type.h" #include "mb/pg_wchar.h" -#include "utils/memutils.h" - -#include "plpython.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" +#include "utils/memutils.h" static PyObject *PLy_cursor_query(const char *query); static void PLy_cursor_dealloc(PyObject *arg); diff --git a/src/pl/plpython/plpy_elog.c b/src/pl/plpython/plpy_elog.c index 15cc444af8e..eb562821a27 100644 --- a/src/pl/plpython/plpy_elog.c +++ b/src/pl/plpython/plpy_elog.c @@ -7,14 +7,10 @@ #include "postgres.h" #include "lib/stringinfo.h" - -#include "plpython.h" - #include "plpy_elog.h" - #include "plpy_main.h" #include "plpy_procedure.h" - +#include "plpython.h" PyObject *PLy_exc_error = NULL; PyObject *PLy_exc_fatal = NULL; diff --git a/src/pl/plpython/plpy_exec.c b/src/pl/plpython/plpy_exec.c index 1aec1b27ddd..c6f6a6fbcca 100644 --- a/src/pl/plpython/plpy_exec.c +++ b/src/pl/plpython/plpy_exec.c @@ -12,20 +12,16 @@ #include "commands/trigger.h" #include "executor/spi.h" #include "funcapi.h" -#include "utils/builtins.h" -#include "utils/lsyscache.h" -#include "utils/rel.h" -#include "utils/typcache.h" - -#include "plpython.h" - -#include "plpy_exec.h" - #include "plpy_elog.h" +#include "plpy_exec.h" #include "plpy_main.h" #include "plpy_procedure.h" #include "plpy_subxactobject.h" - +#include "plpython.h" +#include "utils/builtins.h" +#include "utils/lsyscache.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_main.c b/src/pl/plpython/plpy_main.c index 6edfcf207e5..faaec559a22 100644 --- a/src/pl/plpython/plpy_main.c +++ b/src/pl/plpython/plpy_main.c @@ -12,21 +12,17 @@ #include "commands/trigger.h" #include "executor/spi.h" #include "miscadmin.h" -#include "utils/guc.h" -#include "utils/memutils.h" -#include "utils/rel.h" -#include "utils/syscache.h" - -#include "plpython.h" - -#include "plpy_main.h" - #include "plpy_elog.h" #include "plpy_exec.h" +#include "plpy_main.h" #include "plpy_plpymodule.h" #include "plpy_procedure.h" #include "plpy_subxactobject.h" - +#include "plpython.h" +#include "utils/guc.h" +#include "utils/memutils.h" +#include "utils/rel.h" +#include "utils/syscache.h" /* * exported functions diff --git a/src/pl/plpython/plpy_planobject.c b/src/pl/plpython/plpy_planobject.c index 96ea24cbcf5..c23e79fe55f 100644 --- a/src/pl/plpython/plpy_planobject.c +++ b/src/pl/plpython/plpy_planobject.c @@ -6,16 +6,13 @@ #include "postgres.h" -#include "plpython.h" - -#include "plpy_planobject.h" - #include "plpy_cursorobject.h" #include "plpy_elog.h" +#include "plpy_planobject.h" #include "plpy_spi.h" +#include "plpython.h" #include "utils/memutils.h" - static void PLy_plan_dealloc(PyObject *arg); static PyObject *PLy_plan_cursor(PyObject *self, PyObject *args); static PyObject *PLy_plan_execute(PyObject *self, PyObject *args); diff --git a/src/pl/plpython/plpy_plpymodule.c b/src/pl/plpython/plpy_plpymodule.c index c80b35040bf..e308c61d50f 100644 --- a/src/pl/plpython/plpy_plpymodule.c +++ b/src/pl/plpython/plpy_plpymodule.c @@ -8,21 +8,17 @@ #include "access/xact.h" #include "mb/pg_wchar.h" -#include "utils/builtins.h" -#include "utils/snapmgr.h" - -#include "plpython.h" - -#include "plpy_plpymodule.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" #include "plpy_spi.h" #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 6e08c03fcdb..9e158396111 100644 --- a/src/pl/plpython/plpy_procedure.c +++ b/src/pl/plpython/plpy_procedure.c @@ -11,6 +11,10 @@ #include "funcapi.h" #include "catalog/pg_proc.h" #include "catalog/pg_type.h" +#include "plpy_elog.h" +#include "plpy_main.h" +#include "plpy_procedure.h" +#include "plpython.h" #include "utils/builtins.h" #include "utils/hsearch.h" #include "utils/inval.h" @@ -18,14 +22,6 @@ #include "utils/memutils.h" #include "utils/syscache.h" -#include "plpython.h" - -#include "plpy_procedure.h" - -#include "plpy_elog.h" -#include "plpy_main.h" - - static HTAB *PLy_procedure_cache = NULL; static PLyProcedure *PLy_procedure_create(HeapTuple procTup, Oid fn_oid, bool is_trigger); diff --git a/src/pl/plpython/plpy_resultobject.c b/src/pl/plpython/plpy_resultobject.c index 20cf3edea87..b31dbdaa1d4 100644 --- a/src/pl/plpython/plpy_resultobject.c +++ b/src/pl/plpython/plpy_resultobject.c @@ -6,11 +6,9 @@ #include "postgres.h" -#include "plpython.h" - -#include "plpy_resultobject.h" #include "plpy_elog.h" - +#include "plpy_resultobject.h" +#include "plpython.h" static void PLy_result_dealloc(PyObject *arg); static PyObject *PLy_result_colnames(PyObject *self, PyObject *unused); diff --git a/src/pl/plpython/plpy_spi.c b/src/pl/plpython/plpy_spi.c index ed2eee0603a..99c1b4f28f6 100644 --- a/src/pl/plpython/plpy_spi.c +++ b/src/pl/plpython/plpy_spi.c @@ -14,20 +14,16 @@ #include "executor/spi.h" #include "mb/pg_wchar.h" #include "parser/parse_type.h" -#include "utils/memutils.h" -#include "utils/syscache.h" - -#include "plpython.h" - -#include "plpy_spi.h" - #include "plpy_elog.h" #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_spi.h b/src/pl/plpython/plpy_spi.h index ec7b6893597..a5e2e60da7f 100644 --- a/src/pl/plpython/plpy_spi.h +++ b/src/pl/plpython/plpy_spi.h @@ -5,9 +5,8 @@ #ifndef PLPY_SPI_H #define PLPY_SPI_H -#include "utils/resowner.h" - #include "plpython.h" +#include "utils/resowner.h" extern PyObject *PLy_spi_prepare(PyObject *self, PyObject *args); extern PyObject *PLy_spi_execute(PyObject *self, PyObject *args); diff --git a/src/pl/plpython/plpy_subxactobject.c b/src/pl/plpython/plpy_subxactobject.c index 5dfb8a4cb54..98d7c90c81b 100644 --- a/src/pl/plpython/plpy_subxactobject.c +++ b/src/pl/plpython/plpy_subxactobject.c @@ -7,14 +7,10 @@ #include "postgres.h" #include "access/xact.h" -#include "utils/memutils.h" - -#include "plpython.h" - -#include "plpy_subxactobject.h" - #include "plpy_elog.h" - +#include "plpy_subxactobject.h" +#include "plpython.h" +#include "utils/memutils.h" List *explicit_subtransactions = NIL; diff --git a/src/pl/plpython/plpy_subxactobject.h b/src/pl/plpython/plpy_subxactobject.h index 1ee85c0cdf3..5b6f86326da 100644 --- a/src/pl/plpython/plpy_subxactobject.h +++ b/src/pl/plpython/plpy_subxactobject.h @@ -6,9 +6,8 @@ #define PLPY_SUBXACTOBJECT #include "nodes/pg_list.h" -#include "utils/resowner.h" - #include "plpython.h" +#include "utils/resowner.h" /* a list of nested explicit subtransactions */ extern List *explicit_subtransactions; diff --git a/src/pl/plpython/plpy_typeio.c b/src/pl/plpython/plpy_typeio.c index e1a05244969..e734b0d1303 100644 --- a/src/pl/plpython/plpy_typeio.c +++ b/src/pl/plpython/plpy_typeio.c @@ -11,20 +11,16 @@ #include "funcapi.h" #include "mb/pg_wchar.h" #include "miscadmin.h" +#include "plpy_elog.h" +#include "plpy_main.h" +#include "plpy_typeio.h" +#include "plpython.h" #include "utils/array.h" #include "utils/builtins.h" #include "utils/fmgroids.h" #include "utils/lsyscache.h" #include "utils/memutils.h" -#include "plpython.h" - -#include "plpy_typeio.h" - -#include "plpy_elog.h" -#include "plpy_main.h" - - /* conversion from Datums to Python objects */ static PyObject *PLyBool_FromBool(PLyDatumToOb *arg, Datum d); static PyObject *PLyFloat_FromFloat4(PLyDatumToOb *arg, Datum d); diff --git a/src/pl/plpython/plpy_typeio.h b/src/pl/plpython/plpy_typeio.h index 3412a9817bf..d11e6ae1b89 100644 --- a/src/pl/plpython/plpy_typeio.h +++ b/src/pl/plpython/plpy_typeio.h @@ -7,9 +7,8 @@ #include "access/htup.h" #include "fmgr.h" -#include "utils/typcache.h" - #include "plpython.h" +#include "utils/typcache.h" struct PLyProcedure; /* avoid requiring plpy_procedure.h here */ diff --git a/src/pl/plpython/plpy_util.c b/src/pl/plpython/plpy_util.c index 2128acbd914..4a7d7264d79 100644 --- a/src/pl/plpython/plpy_util.c +++ b/src/pl/plpython/plpy_util.c @@ -7,14 +7,10 @@ #include "postgres.h" #include "mb/pg_wchar.h" -#include "utils/memutils.h" - -#include "plpython.h" - -#include "plpy_util.h" - #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 |
