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 21b1634 commit 2132076Copy full SHA for 2132076
contrib/auto_explain/auto_explain.c
@@ -299,6 +299,13 @@ explain_ExecutorEnd(QueryDesc *queryDesc)
299
if (es.str->len > 0 && es.str->data[es.str->len - 1] == '\n')
300
es.str->data[--es.str->len] = '\0';
301
302
+ /* Fix JSON to output an object */
303
+ if (auto_explain_log_format == EXPLAIN_FORMAT_JSON)
304
+ {
305
+ es.str->data[0] = '{';
306
+ es.str->data[es.str->len - 1] = '}';
307
+ }
308
+
309
/*
310
* Note: we rely on the existing logging of context or
311
* debug_query_string to identify just which statement is being
0 commit comments