JsonbValue to Jsonb conversion

From: Dmitry Dolgov <9erthalion6(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: JsonbValue to Jsonb conversion
Date: 2014-09-23 16:23:33
Message-ID: CA+q6zcVkN5KjB+7wZBj2tv7VmFMRh9oJhTAazz0wfnx21aNUWQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all,

I'm faced with some troubles about the jsonb implementation, and I hope
I'll get little advice =)
If I understand correctly, an abstract function for jsonb modification
should have the following stages:

Jsonb -> JsonbValue -> Modification -> JsonbValue -> Jsonb

One can convert the *JsonbValue* to the *Jsonb* only by *JsonbValueToJsonb*
function. So, my question is can be *JsonbValue*, that contains few
*jbvBinary* elements, converted to *Jsonb* by this function? It will be
very useful, if you want modify only small part of your JsonbValue (e.g.
replace value of some key). But when I'm trying to do this, an exception
"unknown type of jsonb container" appears. Maybe I missed something? Or is
there another approach to do this conversion?

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2014-09-23 16:41:43 Re: Hide 'Execution time' in EXPLAIN (COSTS OFF)
Previous Message Heikki Linnakangas 2014-09-23 16:13:51 Re: proposal: rounding up time value less than its unit.