aboutsummaryrefslogtreecommitdiff
path: root/src/include/utils/jsonb.h
diff options
context:
space:
mode:
authorTeodor Sigaev <teodor@sigaev.ru>2016-04-06 19:20:17 +0300
committerTeodor Sigaev <teodor@sigaev.ru>2016-04-06 19:25:00 +0300
commit0b62fd036e1ac48a8432bb9664b21e1f036c1b08 (patch)
tree09a2b9176bb6b7ed77b86af1c212e7e2a18678a5 /src/include/utils/jsonb.h
parent3b3fcc4eeaeecff315420833975e7c87d760bfe1 (diff)
downloadpostgresql-0b62fd036e1ac48a8432bb9664b21e1f036c1b08.tar.gz
postgresql-0b62fd036e1ac48a8432bb9664b21e1f036c1b08.zip
Add jsonb_insert
It inserts a new value into an jsonb array at arbitrary position or a new key to jsonb object. Author: Dmitry Dolgov Reviewers: Petr Jelinek, Vitaly Burovoy, Andrew Dunstan
Diffstat (limited to 'src/include/utils/jsonb.h')
-rw-r--r--src/include/utils/jsonb.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/include/utils/jsonb.h b/src/include/utils/jsonb.h
index 5f49d8dfea8..5d8e4a9f88c 100644
--- a/src/include/utils/jsonb.h
+++ b/src/include/utils/jsonb.h
@@ -408,6 +408,9 @@ extern Datum jsonb_delete_path(PG_FUNCTION_ARGS);
/* replacement */
extern Datum jsonb_set(PG_FUNCTION_ARGS);
+/* insert after or before (for arrays) */
+extern Datum jsonb_insert(PG_FUNCTION_ARGS);
+
/* Support functions */
extern uint32 getJsonbOffset(const JsonbContainer *jc, int index);
extern uint32 getJsonbLength(const JsonbContainer *jc, int index);