Re: jsonb_set array append hack?

From: Peter Geoghegan <pg(at)heroku(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Dmitry Dolgov <9erthalion6(at)gmail(dot)com>, Thom Brown <thom(at)linux(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: jsonb_set array append hack?
Date: 2015-10-03 20:49:25
Message-ID: CAM3SWZTtS25iQU3Djacfwxz=KHoX2tW8sbJmFwc1jTovLzqbLw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Sep 21, 2015 at 2:21 PM, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
>> Thanks for the explanation. So, basically, it should be like this, am I
>> right?
>>
>> postgres=# SELECT jsonb_set(
>> '{"name": "Joe", "vehicle_types": ["car", "van"]}'::jsonb,
>> '{vehicle_types, nonsense}',
>> '"motorcycle"', true);
>> ERROR: path element at the position 2 is not an integer
>
> That seems reasonable. For that matter, we should probably disallow NULL
> path elements also, shouldn't we?

Are you planning on getting this in by Monday, Andrew? It would be
nice to have this fixed going into beta.

--
Peter Geoghegan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2015-10-03 21:24:20 Re: jsonb_set array append hack?
Previous Message Josh Berkus 2015-10-03 20:17:35 Re: Idea for improving buildfarm robustness