Re: BUG #13996: json_to_record() returns non-NULL, malformed value for omitted key under some circumstances

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #13996: json_to_record() returns non-NULL, malformed value for omitted key under some circumstances
Дата
Msg-id 404.1456976899@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #13996: json_to_record() returns non-NULL, malformed value for omitted key under some circumstances  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-bugs
Andrew Dunstan <andrew@dunslane.net> writes:
> On 03/02/2016 08:04 PM, Tom Lane wrote:
>> AFAICT this is a simple thinko in the hash_object_field_end() callback,
>> as per attached patch that fixes this and doesn't break any existing
>> regression test cases.  Andrew, do you concur that this is correct,
>> or is there something I'm missing about the tracking of lex_level?

> Looks like you're right. lex_level is incremented at object/array start
> and decremented at object/array end. So keys of the outermost object
> will be at lex_level 1, and we shouldn't be using anything at a higher
> level. I guess we should add something like this as an extra regression
> test.

Yeah, I was going to adopt exactly this test case ...

            regards, tom lane

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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: BUG #13996: json_to_record() returns non-NULL, malformed value for omitted key under some circumstances
Следующее
От: alexey.kuntsevich@gmail.com
Дата:
Сообщение: BUG #13998: Misleading error from pg_basebackup