Re: GSoC 2015: Extra Jsonb functionality

Поиск
Список
Период
Сортировка
От Thom Brown
Тема Re: GSoC 2015: Extra Jsonb functionality
Дата
Msg-id CAA-aLv783-P_UCTnYzDCkkv6y6gQ0pCUJDfs0+cb854UfCkp+A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: GSoC 2015: Extra Jsonb functionality  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: GSoC 2015: Extra Jsonb functionality  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
On 19 March 2015 at 14:12, Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
> Dmitry Dolgov wrote:
>
>>     * jsonb_slice - extract a subset of an jsonb
>>       Example of usage:
>>
>>         =# jsonb_slice('{"a": 1, "b": {"c": 2}, "d": {"f": 3}}'::jsonb,
>> ARRAY['b', 'f', 'x']);
>>
>>                jsonb_slice
>>         ---------------------------
>>           {"b": {"c": 2}, "f": 3}
>
> This is a bit strange.  Why did "f" get flattened out of "d"?  Is the
> resulting document still valid for the purposes of an application using
> it?  I think I'd expect the result to be {"b": {"c": 2}, "d": {"f": 3}}

Why would "d" be output when it wasn't in the requested slice?
Although I'm still a bit confused about "f" being produced.

-- 
Thom



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: How about to have relnamespace and relrole?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: "cancelling statement due to user request error" occurs but the transaction has committed.