We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6fb17ae commit 6c1603cCopy full SHA for 6c1603c
contrib/auto_explain/auto_explain.c
@@ -282,6 +282,13 @@ explain_ExecutorEnd(QueryDesc *queryDesc)
282
if (es.str->len > 0 && es.str->data[es.str->len - 1] == '\n')
283
es.str->data[--es.str->len] = '\0';
284
285
+ /* Fix JSON to output an object */
286
+ if (auto_explain_log_format == EXPLAIN_FORMAT_JSON)
287
+ {
288
+ es.str->data[0] = '{';
289
+ es.str->data[es.str->len - 1] = '}';
290
+ }
291
+
292
/*
293
* Note: we rely on the existing logging of context or
294
* debug_query_string to identify just which statement is being
0 commit comments