aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2020-01-17 11:41:35 +1030
committerAndrew Dunstan <andrew@dunslane.net>2020-01-17 11:52:39 +1030
commita83586b5543b948f9e621462537a7303b113c482 (patch)
tree98c49e29a4b1a4014fd8ae040d6939812696a841 /src/include
parentf7cd5896a69621818189fbdd209fb2e1fc008102 (diff)
downloadpostgresql-a83586b5543b948f9e621462537a7303b113c482.tar.gz
postgresql-a83586b5543b948f9e621462537a7303b113c482.zip
Add a non-strict version of jsonb_set
jsonb_set_lax() is the same as jsonb_set, except that it takes and extra argument that specifies what to do if the value argument is NULL. The default is 'use_json_null'. Other possibilities are 'raise_exception', 'return_target' and 'delete_key', all these behaviours having been suggested as reasonable by various users. Discussion: https://postgr.es/m/375873e2-c957-3a8d-64f9-26c43c2b16e7@2ndQuadrant.com Reviewed by: Pavel Stehule
Diffstat (limited to 'src/include')
-rw-r--r--src/include/catalog/pg_proc.dat3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/include/catalog/pg_proc.dat b/src/include/catalog/pg_proc.dat
index 427faa3c3b6..fcf2a1214c4 100644
--- a/src/include/catalog/pg_proc.dat
+++ b/src/include/catalog/pg_proc.dat
@@ -9305,6 +9305,9 @@
{ oid => '3304',
proname => 'jsonb_delete_path', prorettype => 'jsonb',
proargtypes => 'jsonb _text', prosrc => 'jsonb_delete_path' },
+{ oid => '8945', descr => 'Set part of a jsonb, handle NULL value',
+ proname => 'jsonb_set_lax', prorettype => 'jsonb', proisstrict => 'f',
+ proargtypes => 'jsonb _text jsonb bool text', prosrc => 'jsonb_set_lax' },
{ oid => '3305', descr => 'Set part of a jsonb',
proname => 'jsonb_set', prorettype => 'jsonb',
proargtypes => 'jsonb _text jsonb bool', prosrc => 'jsonb_set' },