Re: inconsistent behaviour of json_to_record and friends withembedded json

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: inconsistent behaviour of json_to_record and friends withembedded json
Дата
Msg-id 6c07d61e-be88-a2d2-f158-023175b9e03f@dunslane.net
обсуждение исходный текст
Ответ на Re: inconsistent behaviour of json_to_record and friends with embedded json  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On 6/11/19 1:35 PM, Tom Lane wrote:
> I wrote:
>> I agree.  It looks to me like the problem is this over-optimistic
>> assumption:
>>             /*
>>              * Add quotes around string value (should be already escaped) if
>>              * converting to json/jsonb.
>>              */
>> No, it's *not* already escaped.  Fixing the code to use escape_json()
>> is a bit tedious, because for some reason that function wasn't designed
>> to support non-null-terminated input, but with the attached patch we get
>> what seems to me like sane behavior:
> Hearing no comments, I've pushed this patch.  I also rewrote the
> documentation to provide something approaching a specification for
> what json_to_record() and friends do.


Sorry, I meant to tell you your fix looked good to me, it slipped
through the net.


Thanks for fixing this.


cheers


andrew





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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: inconsistent behaviour of json_to_record and friends with embedded json
Следующее
От: PG Bug reporting form
Дата:
Сообщение: BUG #15846: problem with the pgdg repository for fedora-29