Re: BUG #13680: PostgreSQL backend process crashes on jsonb_object_agg() in plpgsql recursive function

Поиск
Список
Период
Сортировка
Искать
От
boyko yordanov
Тема
Re: BUG #13680: PostgreSQL backend process crashes on jsonb_object_agg() in plpgsql recursive function
Дата
Msg-id
CAHP8fXwpLw5-C9Ait1zLLyXtns9tifT7n4Tt=rC0kTwZqFSiEg@mail.gmail.com
Ответ на
Список
Дерево обсуждения
Re: BUG #13680: PostgreSQL backend process crashes on jsonb_object_agg() in plpgsql recursive function Michael Paquier <michael.paquier@gmail.com>
Re: BUG #13680: PostgreSQL backend process crashes on jsonb_object_agg() in plpgsql recursive function Michael Paquier <michael.paquier@gmail.com>
Re: BUG #13680: PostgreSQL backend process crashes on jsonb_object_agg() in plpgsql recursive function Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #13680: PostgreSQL backend process crashes on jsonb_object_agg() in plpgsql recursive function Michael Paquier <michael.paquier@gmail.com>
Re: BUG #13680: PostgreSQL backend process crashes on jsonb_object_agg() in plpgsql recursive function boyko yordanov <b.yordanov2@gmail.com>
Re: BUG #13680: PostgreSQL backend process crashes on jsonb_object_agg() in plpgsql recursive function Michael Paquier <michael.paquier@gmail.com>
Re: BUG #13680: PostgreSQL backend process crashes on jsonb_object_agg() in plpgsql recursive function boyko yordanov <b.yordanov2@gmail.com>
Now I get it, its about operators precedence. Thanks once again!

2015-10-15 14:31 GMT+03:00 Michael Paquier :

> On Thu, Oct 15, 2015 at 7:07 PM, boyko yordanov wrote:
> > sravni_hstore=# select ('{"3": {"9703": {"c": 1}}}'::jsonb->'3') ||
> ('{"3":
> > {"8309": {"c": 1}}}'::jsonb->'3');
> > -[ RECORD 1 ]----------------------------------
> > ?column? | {"8309": {"c": 1}, "9703": {"c": 1}}
> >
> > sravni_hstore=# select '{"3": {"9703": {"c": 1}}}'::jsonb->'3' || '{"3":
> > {"8309": {"c": 1}}}'::jsonb->'3';
> > -[ RECORD 1 ]----------------
> > ?column? | {"8309": {"c": 1}}
> >
> > What I expect is that there should be no difference in the output of the
> > last two queries. Not sure if I should submit this as a separate bug?
>
> The last one looks correct to me, the concat operator is using on the
> right side '{"3": {"8309": {"c": 1}}}'::jsonb in your last query, and
> not '{"3": {"8309": {"c": 1}}}'::jsonb->'3', so || takes precedence on
> ->. When applying the parenthesis, ('{"3": {"8309": {"c":
> 1}}}'::jsonb->'3') is completely taken into account.
> --
> Michael
>
В списке pgsql-bugs по дате отправления
От: Amit Kapila
Дата:
Сообщение: Re: PQexec() hangs on OOM
От: a.n.d@inbox.ru
Дата:
FAQ