* Emit the end-of-output boilerplate. */
| 5921 | * Emit the end-of-output boilerplate. |
| 5922 | */ |
| 5923 | void |
| 5924 | ExplainEndOutput(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 |
no test coverage detected