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

Commit 6fa9344

Browse files
author
Nikita Glukhov
committed
Add jsonpath operators @*, @?, @~
1 parent 4479d07 commit 6fa9344

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
@@ -5481,9 +5481,9 @@ DESCR("I/O");
54815481
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_ ));
54825482
DESCR("I/O");
54835483
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_ ));
5484-
DESCR("jsonpath exists test");
5484+
DESCR("implementation of @? operator");
54855485
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_ ));
5486-
DESCR("jsonpath query");
5486+
DESCR("implementation of @* operator");
54875487
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_ ));
54885488
DESCR("jsonpath exists test");
54895489
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_ ));
@@ -5493,7 +5493,7 @@ DESCR("jsonpath query, empty on error");
54935493
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_ ));
54945494
DESCR("jsonpath query, empty on error");
54955495
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_ ));
5496-
DESCR("jsonpath predicate test");
5496+
DESCR("implementation of @~ operator");
54975497
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_ ));
54985498
DESCR("jsonpath predicate test");
54995499

0 commit comments

Comments
 (0)