Re: [HACKERS] problem with precendence order in JSONB merge operator

2016-03-22 Thread David G. Johnston
Please don't top-post. On Tuesday, March 22, 2016, Peter Krauss wrote: > Subjective notes to contextualize (try to explain on bad-English) my > "precedence order" and JSONB visions: > > JSON datatype is perfect as workaround, and for many simple and less > exigent applications. > JSONB is the "

Re: [HACKERS] problem with precendence order in JSONB merge operator

2016-03-22 Thread Peter Krauss
Subjective notes to contextualize (try to explain on bad-English) my "precedence order" and JSONB visions: JSON datatype is perfect as workaround, and for many simple and less exigent applications. JSONB is the "first class" datatype for user community, we expected years (!) for it ... Need some

Re: [HACKERS] problem with precendence order in JSONB merge operator

2016-03-22 Thread David G. Johnston
On Tue, Mar 22, 2016 at 1:52 PM, Peter Krauss wrote: > Seems that parser not using precedence ideal order, and that casting > obligation losts performance. > > The first problem is self-evident in this example: > > SELECT '{"x":1}'::jsonb || (('{"A":{"y":2}}'::jsonb)->'A') > -- it is ok, expect

[HACKERS] problem with precendence order in JSONB merge operator

2016-03-22 Thread Peter Krauss
Seems that parser not using precedence ideal order, and that casting obligation losts performance. The first problem is self-evident in this example: SELECT '{"x":1}'::jsonb || (('{"A":{"y":2}}'::jsonb)->'A') -- it is ok, expected result with (x,y) SELECT '{"x":1}'::jsonb || '{"A":{"y":2}}'::js