Re: BUG #13533: jsonb_populate_record does not work when the value is a simple string

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #13533: jsonb_populate_record does not work when the value is a simple string
Дата
Msg-id 20357.1438733974@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #13533: jsonb_populate_record does not work when the value is a simple string  (paulovieira@gmail.com)
Ответы Re: BUG #13533: jsonb_populate_record does not work when the value is a simple string
Список pgsql-bugs
Paulo Vieira <paulovieira@gmail.com> writes:
> On Mon, Aug 3, 2015 at 5:40 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> This does not seem like a bug, because the value of the data field is
>> just abc, and that isn't JSON.  You'd need something more like
>>
>> input_data json := '{"id": 1, "data": "\"abc\""}';

> I'm confused. In my example the value is <double quotes>abc<double quotes>,
> which is a valid json value (and not simply abc).

No, the value of the field is just abc --- the quotes are JSON syntax
decoration, they are not part of the represented value.  If we do it
as you seem to have in mind, it would be impossible to deal sanely
with data values that contain quotes or backslashes.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #13530: sort receives "unexpected out-of-memory situation during sort"
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: BUG #13533: jsonb_populate_record does not work when the value is a simple string