]> granicus.if.org Git - postgresql/commit
Disallow invalid path elements in jsonb_set
authorAndrew Dunstan <andrew@dunslane.net>
Sun, 4 Oct 2015 17:28:16 +0000 (13:28 -0400)
committerAndrew Dunstan <andrew@dunslane.net>
Sun, 4 Oct 2015 17:48:24 +0000 (13:48 -0400)
commit544ccf644288132f805260c4eb9fd12029c5cf8c
tree7dd30ce4046fdac348a7ad246966250d2561c951
parente45f8f882055d5f864815aa29ffcd2b5e3c2013b
Disallow invalid path elements in jsonb_set

Null path elements and, where the object is an array, invalid integer
elements now cause an error.

Incorrect behaviour noted by Thom Brown, patch from Dmitry Dolgov.

Backpatch to 9.5 where jsonb_set was introduced
src/backend/utils/adt/jsonfuncs.c
src/test/regress/expected/jsonb.out
src/test/regress/expected/jsonb_1.out
src/test/regress/sql/jsonb.sql