diff options
-rw-r--r-- | src/backend/commands/explain_dr.c | 1 | ||||
-rw-r--r-- | src/backend/tcop/dest.c | 2 | ||||
-rw-r--r-- | src/include/commands/explain.h | 2 | ||||
-rw-r--r-- | src/include/commands/explain_dr.h | 6 | ||||
-rw-r--r-- | src/include/commands/explain_format.h | 42 |
5 files changed, 30 insertions, 23 deletions
diff --git a/src/backend/commands/explain_dr.c b/src/backend/commands/explain_dr.c index a0a37ea70f4..fb42bee6e72 100644 --- a/src/backend/commands/explain_dr.c +++ b/src/backend/commands/explain_dr.c @@ -13,6 +13,7 @@ */ #include "postgres.h" +#include "commands/explain.h" #include "commands/explain_dr.h" #include "libpq/pqformat.h" #include "libpq/protocol.h" diff --git a/src/backend/tcop/dest.c b/src/backend/tcop/dest.c index b44f9072280..b620766c938 100644 --- a/src/backend/tcop/dest.c +++ b/src/backend/tcop/dest.c @@ -33,7 +33,7 @@ #include "access/xact.h" #include "commands/copy.h" #include "commands/createas.h" -#include "commands/explain.h" +#include "commands/explain_dr.h" #include "commands/matview.h" #include "executor/functions.h" #include "executor/tqueue.h" diff --git a/src/include/commands/explain.h b/src/include/commands/explain.h index 8dd87c47eec..64547bd9b9c 100644 --- a/src/include/commands/explain.h +++ b/src/include/commands/explain.h @@ -120,6 +120,4 @@ extern void ExplainPrintJITSummary(ExplainState *es, QueryDesc *queryDesc); extern void ExplainQueryText(ExplainState *es, QueryDesc *queryDesc); extern void ExplainQueryParameters(ExplainState *es, ParamListInfo params, int maxlen); -extern DestReceiver *CreateExplainSerializeDestReceiver(ExplainState *es); - #endif /* EXPLAIN_H */ diff --git a/src/include/commands/explain_dr.h b/src/include/commands/explain_dr.h index 8f86239b41e..55da63d66bd 100644 --- a/src/include/commands/explain_dr.h +++ b/src/include/commands/explain_dr.h @@ -13,8 +13,10 @@ #ifndef EXPLAIN_DR_H #define EXPLAIN_DR_H -#include "commands/explain.h" #include "executor/instrument.h" +#include "tcop/dest.h" + +struct ExplainState; /* avoid including explain.h here */ /* Instrumentation data for EXPLAIN's SERIALIZE option */ typedef struct SerializeMetrics @@ -24,7 +26,7 @@ typedef struct SerializeMetrics BufferUsage bufferUsage; /* buffers accessed during serialization */ } SerializeMetrics; -extern DestReceiver *CreateExplainSerializeDestReceiver(ExplainState *es); +extern DestReceiver *CreateExplainSerializeDestReceiver(struct ExplainState *es); extern SerializeMetrics GetSerializationMetrics(DestReceiver *dest); #endif diff --git a/src/include/commands/explain_format.h b/src/include/commands/explain_format.h index 0460f0fd2af..05045bf8cb4 100644 --- a/src/include/commands/explain_format.h +++ b/src/include/commands/explain_format.h @@ -13,40 +13,46 @@ #ifndef EXPLAIN_FORMAT_H #define EXPLAIN_FORMAT_H -#include "commands/explain.h" +#include "nodes/pg_list.h" + +struct ExplainState; /* avoid including explain.h here */ extern void ExplainPropertyList(const char *qlabel, List *data, - ExplainState *es); + struct ExplainState *es); extern void ExplainPropertyListNested(const char *qlabel, List *data, - ExplainState *es); + struct ExplainState *es); extern void ExplainPropertyText(const char *qlabel, const char *value, - ExplainState *es); + struct ExplainState *es); extern void ExplainPropertyInteger(const char *qlabel, const char *unit, - int64 value, ExplainState *es); + int64 value, struct ExplainState *es); extern void ExplainPropertyUInteger(const char *qlabel, const char *unit, - uint64 value, ExplainState *es); + uint64 value, struct ExplainState *es); extern void ExplainPropertyFloat(const char *qlabel, const char *unit, - double value, int ndigits, ExplainState *es); + double value, int ndigits, + struct ExplainState *es); extern void ExplainPropertyBool(const char *qlabel, bool value, - ExplainState *es); + struct ExplainState *es); extern void ExplainOpenGroup(const char *objtype, const char *labelname, - bool labeled, ExplainState *es); + bool labeled, struct ExplainState *es); extern void ExplainCloseGroup(const char *objtype, const char *labelname, - bool labeled, ExplainState *es); + bool labeled, struct ExplainState *es); extern void ExplainOpenSetAsideGroup(const char *objtype, const char *labelname, - bool labeled, int depth, ExplainState *es); -extern void ExplainSaveGroup(ExplainState *es, int depth, int *state_save); -extern void ExplainRestoreGroup(ExplainState *es, int depth, int *state_save); + bool labeled, int depth, + struct ExplainState *es); +extern void ExplainSaveGroup(struct ExplainState *es, int depth, + int *state_save); +extern void ExplainRestoreGroup(struct ExplainState *es, int depth, + int *state_save); extern void ExplainDummyGroup(const char *objtype, const char *labelname, - ExplainState *es); + struct ExplainState *es); -extern void ExplainBeginOutput(ExplainState *es); -extern void ExplainEndOutput(ExplainState *es); -extern void ExplainSeparatePlans(ExplainState *es); +extern void ExplainBeginOutput(struct ExplainState *es); +extern void ExplainEndOutput(struct ExplainState *es); +extern void ExplainSeparatePlans(struct ExplainState *es); -extern void ExplainIndentText(ExplainState *es); +extern void ExplainIndentText(struct ExplainState *es); #endif |