| От | Andrew Dunstan |
|---|---|
| Тема | Re: auto_explain produces invalid JSON |
| Дата | |
| Msg-id | 4F36CB91.3030304@dunslane.net обсуждение исходный текст |
| Ответ на | Re: auto_explain produces invalid JSON (Andrew Dunstan <andrew@dunslane.net>) |
| Список | pgsql-hackers |
On 02/11/2012 01:18 PM, Andrew Dunstan wrote: > > > On 02/10/2012 01:14 PM, Peter Eisentraut wrote: >> [ auto-explain JSON output should be an object instead of an array ] > > > > Yeah, looks like this dates back to when we first got JSON output. > > Auto-explain does this: > > ExplainBeginOutput(&es); > ExplainQueryText(&es, queryDesc); > ExplainPrintPlan(&es, queryDesc); > ExplainEndOutput(&es); > > > But ExplainBeginOutput says: > > case EXPLAIN_FORMAT_JSON: > /* top-level structure is an array of plans */ > appendStringInfoChar(es->str, '['); > > > Now that's not true in the auto-explain case, which prints one query + > one plan. > > Since this is an exposed API, I don't think we can just change it. We > probably need a new API that does the right thing for beginning and > ending auto_explain output. (ExplainBeginLabeledOutput?) > > PFA a patch along these lines, which seems to do the Right Thing (tm) cheers andrew
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера