diff options
author | Andrew Dunstan <andrew@dunslane.net> | 2015-06-07 20:46:00 -0400 |
---|---|---|
committer | Andrew Dunstan <andrew@dunslane.net> | 2015-06-07 20:46:00 -0400 |
commit | b81c7b4098f52e64df89efe1461ba00a54649a10 (patch) | |
tree | 924db92137a235ef088724a3a967799f13da38a8 /doc/src | |
parent | d23a3a603b8eed5e8e34b193d43e9ca5f380ef3f (diff) |
Desupport jsonb subscript deletion on objects
Supporting deletion of JSON pairs within jsonb objects using an
array-style integer subscript allowed for surprising outcomes. This was
mostly due to the implementation-defined ordering of pairs within
objects for jsonb.
It also seems desirable to make jsonb integer subscript deletion
consistent with the 9.4 era general purpose integer subscripting
operator for jsonb (although that operator returns NULL when an object
is encountered, while we prefer here to throw an error).
Peter Geoghegan, following discussion on -hackers.
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/func.sgml | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 1fb9ae217f7..2d42b1e1743 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -10309,8 +10309,9 @@ table2-mapping <row> <entry><literal>-</literal></entry> <entry><type>integer</type></entry> - <entry>Delete the field or element with specified index (Negative - integers count from the end)</entry> + <entry>Delete the array element with specified index (Negative + integers count from the end). Throws an error if top level + container is not an array.</entry> <entry><literal>'["a", "b"]'::jsonb - 1 </literal></entry> </row> <row> |