Re: BUG #16171: Potential malformed JSON in explain output

Поиск
Список
Период
Сортировка
От hubert depesz lubaczewski
Тема Re: BUG #16171: Potential malformed JSON in explain output
Дата
Msg-id 20200203114022.GA29777@depesz.com
обсуждение исходный текст
Ответ на Re: BUG #16171: Potential malformed JSON in explain output  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Sun, Feb 02, 2020 at 11:48:32AM -0500, Tom Lane wrote:
> > Does that prevent backpatching this, or are we Ok with EXPLAIN text output not
> > being stable across minors?  AFAICT Pg::Explain still works fine with this
> > change, but mileage may vary for other parsers.
> I'm not sure about that either.  It should be a clear win for parsers
> of the non-text formats, because now we're generating valid
> JSON-or-whatever where we were not before.  But it's not too hard to
> imagine that someone's ad-hoc parser of text output would break,
> depending on how much it relies on field order rather than indentation
> to make sense of things.

Change looks reasonable to me.

Interestingly Pg::Explain doesn't handle either current JSON output in
this case (as it's not a valid JSON), nor the new one - but this can be
fixed easily.

Best regards,

depesz




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager
Следующее
От: Daniel Gustafsson
Дата:
Сообщение: Re: Add %x to PROMPT1 and PROMPT2