Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 6867baa

Browse files
author
Nikita Glukhov
committed
Add jsonpath operators @*, @?, @~
1 parent 65dd7b8 commit 6867baa

File tree

4 files changed

+991
-967
lines changed

4 files changed

+991
-967
lines changed

src/include/catalog/pg_operator.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1853,5 +1853,11 @@ DATA(insert OID = 3286 ( "-" PGNSP PGUID b f f 3802 23 3802 0 0 3303 - - ));
18531853
DESCR("delete array element");
18541854
DATA(insert OID = 3287 ( "#-" PGNSP PGUID b f f 3802 1009 3802 0 0 jsonb_delete_path - - ));
18551855
DESCR("delete path");
1856+
DATA(insert OID = 6075 ( "@*" PGNSP PGUID b f f 3802 6050 3802 0 0 6055 - - ));
1857+
DESCR("jsonpath items");
1858+
DATA(insert OID = 6076 ( "@?" PGNSP PGUID b f f 3802 6050 16 0 0 6054 contsel contjoinsel ));
1859+
DESCR("jsonpath exists");
1860+
DATA(insert OID = 6107 ( "@~" PGNSP PGUID b f f 3802 6050 16 0 0 6073 contsel contjoinsel ));
1861+
DESCR("jsonpath predicate");
18561862

18571863
#endif /* PG_OPERATOR_H */

src/include/catalog/pg_proc.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5528,9 +5528,9 @@ DESCR("I/O");
55285528
DATA(insert OID = 6053 ( jsonpath_out PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 2275 "6050" _null_ _null_ _null_ _null_ _null_ jsonpath_out _null_ _null_ _null_ ));
55295529
DESCR("I/O");
55305530
DATA(insert OID = 6054 ( _jsonpath_exists PGNSP PGUID 12 1 0 0 0 f f f f t f i s 2 0 16 "3802 6050" _null_ _null_ _null_ _null_ _null_ jsonb_jsonpath_exists2 _null_ _null_ _null_ ));
5531-
DESCR("jsonpath exists test");
5531+
DESCR("implementation of @? operator");
55325532
DATA(insert OID = 6055 ( _jsonpath_query PGNSP PGUID 12 1 1000 0 0 f f f f t t i s 2 0 3802 "3802 6050" _null_ _null_ _null_ _null_ _null_ jsonb_jsonpath_query2 _null_ _null_ _null_ ));
5533-
DESCR("jsonpath query");
5533+
DESCR("implementation of @* operator");
55345534
DATA(insert OID = 6056 ( _jsonpath_exists PGNSP PGUID 12 1 0 0 0 f f f f t f i s 3 0 16 "3802 6050 3802" _null_ _null_ _null_ _null_ _null_ jsonb_jsonpath_exists3 _null_ _null_ _null_ ));
55355535
DESCR("jsonpath exists test");
55365536
DATA(insert OID = 6057 ( _jsonpath_query PGNSP PGUID 12 1 1000 0 0 f f f f t t i s 3 0 3802 "3802 6050 3802" _null_ _null_ _null_ _null_ _null_ jsonb_jsonpath_query3 _null_ _null_ _null_ ));
@@ -5540,7 +5540,7 @@ DESCR("jsonpath query, empty on error");
55405540
DATA(insert OID = 6059 ( _jsonpath_query_safe PGNSP PGUID 12 1 1000 0 0 f f f f t t i s 3 0 3802 "3802 6050 3802" _null_ _null_ _null_ _null_ _null_ jsonb_jsonpath_query_safe3 _null_ _null_ _null_ ));
55415541
DESCR("jsonpath query, empty on error");
55425542
DATA(insert OID = 6073 ( _jsonpath_predicate PGNSP PGUID 12 1 0 0 0 f f f f t f i s 2 0 16 "3802 6050" _null_ _null_ _null_ _null_ _null_ jsonb_jsonpath_predicate2 _null_ _null_ _null_ ));
5543-
DESCR("jsonpath predicate test");
5543+
DESCR("implementation of @~ operator");
55445544
DATA(insert OID = 6074 ( _jsonpath_predicate PGNSP PGUID 12 1 0 0 0 f f f f t f i s 3 0 16 "3802 6050 3802" _null_ _null_ _null_ _null_ _null_ jsonb_jsonpath_predicate3 _null_ _null_ _null_ ));
55455545
DESCR("jsonpath predicate test");
55465546

0 commit comments

Comments
 (0)