MCPcopy Create free account
hub / github.com/apache/cloudberry / ExplainEndOutput

Function ExplainEndOutput

src/backend/commands/explain.c:5923–5947  ·  view source on GitHub ↗

* Emit the end-of-output boilerplate. */

Source from the content-addressed store, hash-verified

5921 * Emit the end-of-output boilerplate.
5922 */
5923void
5924ExplainEndOutput(ExplainState *es)
5925{
5926 switch (es->format)
5927 {
5928 case EXPLAIN_FORMAT_TEXT:
5929 /* nothing to do */
5930 break;
5931
5932 case EXPLAIN_FORMAT_XML:
5933 es->indent--;
5934 appendStringInfoString(es->str, "</explain>");
5935 break;
5936
5937 case EXPLAIN_FORMAT_JSON:
5938 es->indent--;
5939 appendStringInfoString(es->str, "\n]");
5940 es->grouping_stack = list_delete_first(es->grouping_stack);
5941 break;
5942
5943 case EXPLAIN_FORMAT_YAML:
5944 es->grouping_stack = list_delete_first(es->grouping_stack);
5945 break;
5946 }
5947}
5948
5949/*
5950 * Put an appropriate separator between multiple plans

Callers 2

explain_ExecutorEndFunction · 0.85
ExplainQueryFunction · 0.85

Calls 2

appendStringInfoStringFunction · 0.85
list_delete_firstFunction · 0.85

Tested by

no test coverage detected