BUG #14366: jsonb_set() error when modify array element

Started by sunpengover 9 years ago3 messagesbugs
Jump to latest
#1sunpeng
bluevaley@gmail.com

The following bug has been logged on the website:

Bug reference: 14366
Logged by: peng sun
Email address: bluevaley@gmail.com
PostgreSQL version: 9.6.0
Operating system: win8.1
Description:

select jsonb_set('[{"f1":1,"f2":null},2,null,3]', '{0}','[2,3,4]', false);
in 9.6, got:
[2, null, 3]
in 9.5.4, got:
[[2, 3, 4], 2, null, 3]

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: sunpeng (#1)
Re: BUG #14366: jsonb_set() error when modify array element

bluevaley@gmail.com writes:

The following bug has been logged on the website:
Bug reference: 14366
Logged by: peng sun
Email address: bluevaley@gmail.com
PostgreSQL version: 9.6.0
Operating system: win8.1
Description:

select jsonb_set('[{"f1":1,"f2":null},2,null,3]', '{0}','[2,3,4]', false);
in 9.6, got:
[2, null, 3]
in 9.5.4, got:
[[2, 3, 4], 2, null, 3]

Yeah, this is broken. Fixed, thanks for the report!

regards, tom lane

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

#3Michael Paquier
michael@paquier.xyz
In reply to: Tom Lane (#2)
Re: BUG #14366: jsonb_set() error when modify array element

On Thu, Oct 13, 2016 at 1:26 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

select jsonb_set('[{"f1":1,"f2":null},2,null,3]', '{0}','[2,3,4]', false);
in 9.6, got:
[2, null, 3]
in 9.5.4, got:
[[2, 3, 4], 2, null, 3]

Yeah, this is broken. Fixed, thanks for the report!

Too late I guess..
--
Michael

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs