mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Implement array version of jsonb_delete and operator
This makes it possible to delete multiple keys from a jsonb value by passing in an array of text values, which makes the operaiton much faster than individually deleting the keys (which would require copying the jsonb structure over and over again. Reviewed by Dmitry Dolgov and Michael Paquier
This commit is contained in:
@ -10843,6 +10843,14 @@ table2-mapping
|
||||
on their key value.</entry>
|
||||
<entry><literal>'{"a": "b"}'::jsonb - 'a' </literal></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>-</literal></entry>
|
||||
<entry><type>text[]</type></entry>
|
||||
<entry>Delete multiple key/value pairs or <emphasis>string</emphasis>
|
||||
elements from left operand. Key/value pairs are matched based
|
||||
on their key value.</entry>
|
||||
<entry><literal>'{"a": "b", "c": "d"}'::jsonb - '{a,c}'::text[] </literal></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>-</literal></entry>
|
||||
<entry><type>integer</type></entry>
|
||||
|
Reference in New Issue
Block a user