* Close a group of related objects. * Parameters must match the corresponding ExplainOpenGroup call. */
| 5697 | * Parameters must match the corresponding ExplainOpenGroup call. |
| 5698 | */ |
| 5699 | void |
| 5700 | ExplainCloseGroup(const char *objtype, const char *labelname, |
| 5701 | bool labeled, ExplainState *es) |
| 5702 | { |
| 5703 | switch (es->format) |
| 5704 | { |
| 5705 | case EXPLAIN_FORMAT_TEXT: |
| 5706 | /* nothing to do */ |
| 5707 | break; |
| 5708 | |
| 5709 | case EXPLAIN_FORMAT_XML: |
| 5710 | es->indent--; |
| 5711 | ExplainXMLTag(objtype, X_CLOSING, es); |
| 5712 | break; |
| 5713 | |
| 5714 | case EXPLAIN_FORMAT_JSON: |
| 5715 | es->indent--; |
| 5716 | appendStringInfoChar(es->str, '\n'); |
| 5717 | appendStringInfoSpaces(es->str, 2 * es->indent); |
| 5718 | appendStringInfoChar(es->str, labeled ? '}' : ']'); |
| 5719 | es->grouping_stack = list_delete_first(es->grouping_stack); |
| 5720 | break; |
| 5721 | |
| 5722 | case EXPLAIN_FORMAT_YAML: |
| 5723 | es->indent--; |
| 5724 | es->grouping_stack = list_delete_first(es->grouping_stack); |
| 5725 | break; |
| 5726 | } |
| 5727 | } |
| 5728 | |
| 5729 | /* |
| 5730 | * Open a group of related objects, without emitting actual data. |
no test coverage detected