summaryrefslogtreecommitdiff
path: root/src/include/commands/explain_dr.h
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2025-09-15 10:48:30 +0200
committerPeter Eisentraut <peter@eisentraut.org>2025-09-15 11:04:10 +0200
commit70407d39b7ea8fd41496489b5f6a30c285e7d7d0 (patch)
tree28d5953d89105b1caa19f7cff9554e49a1fa6f0d /src/include/commands/explain_dr.h
parent1e3b5edb8eb236f16529ca8dae917996ad1f433e (diff)
Improve ExplainState type handling in header files
Now that we can have repeat typedefs with C11, we don't need to use "struct ExplainState" anymore but can instead make a typedef where necessary. This doesn't change anything but makes it look nicer. (There are more opportunities for similar changes, but this is broken out because there was a separate discussion about it, and it's somewhat bulky on its own.) Reviewed-by: Chao Li <li.evan.chao@gmail.com> Discussion: https://www.postgresql.org/message-id/flat/f36c0a45-98cd-40b2-a7cc-f2bf02b12890%40eisentraut.org#a12fb1a2c1089d6d03010f6268871b00 Discussion: https://www.postgresql.org/message-id/flat/10d32190-f31b-40a5-b177-11db55597355@eisentraut.org
Diffstat (limited to 'src/include/commands/explain_dr.h')
-rw-r--r--src/include/commands/explain_dr.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/include/commands/explain_dr.h b/src/include/commands/explain_dr.h
index 55da63d66bd..b62f1f8542c 100644
--- a/src/include/commands/explain_dr.h
+++ b/src/include/commands/explain_dr.h
@@ -16,7 +16,8 @@
#include "executor/instrument.h"
#include "tcop/dest.h"
-struct ExplainState; /* avoid including explain.h here */
+/* avoid including explain_state.h here */
+typedef struct ExplainState ExplainState;
/* Instrumentation data for EXPLAIN's SERIALIZE option */
typedef struct SerializeMetrics
@@ -26,7 +27,7 @@ typedef struct SerializeMetrics
BufferUsage bufferUsage; /* buffers accessed during serialization */
} SerializeMetrics;
-extern DestReceiver *CreateExplainSerializeDestReceiver(struct ExplainState *es);
+extern DestReceiver *CreateExplainSerializeDestReceiver(ExplainState *es);
extern SerializeMetrics GetSerializationMetrics(DestReceiver *dest);
#endif