File tree 2 files changed +29
-0
lines changed
Filter options
2 files changed +29
-0
lines changed
Original file line number Diff line number Diff line change @@ -793,6 +793,30 @@ select '[1,2,3]'::jsonb @@ '#($ = 2)';
793
793
t
794
794
(1 row)
795
795
796
+ select '[3,4]'::jsonb @@ '#($ > 2 & $ < 5)';
797
+ ?column?
798
+ ----------
799
+ t
800
+ (1 row)
801
+
802
+ select '[3,4]'::jsonb @@ '# > 2 & # < 5';
803
+ ?column?
804
+ ----------
805
+ t
806
+ (1 row)
807
+
808
+ select '[1,6]'::jsonb @@ '#($ > 2 & $ < 5)';
809
+ ?column?
810
+ ----------
811
+ f
812
+ (1 row)
813
+
814
+ select '[1,6]'::jsonb @@ '# > 2 & # < 5';
815
+ ?column?
816
+ ----------
817
+ t
818
+ (1 row)
819
+
796
820
select '{"a": {"b": 3, "c": "hey"}, "x": [5,6]}'::jsonb @@ '%.b=3';
797
821
?column?
798
822
----------
Original file line number Diff line number Diff line change @@ -160,6 +160,11 @@ select '[1,2,3]'::jsonb @@ '# = 2';
160
160
select ' [1,2,3]' ::jsonb @@ ' #.$ = 2' ;
161
161
select ' [1,2,3]' ::jsonb @@ ' #($ = 2)' ;
162
162
163
+ select ' [3,4]' ::jsonb @@ ' #($ > 2 & $ < 5)' ;
164
+ select ' [3,4]' ::jsonb @@ ' # > 2 & # < 5' ;
165
+ select ' [1,6]' ::jsonb @@ ' #($ > 2 & $ < 5)' ;
166
+ select ' [1,6]' ::jsonb @@ ' # > 2 & # < 5' ;
167
+
163
168
select ' {"a": {"b": 3, "c": "hey"}, "x": [5,6]}' ::jsonb @@ ' %.b=3' ;
164
169
select ' {"a": {"b": 3, "c": "hey"}, "x": [5,6]}' ::jsonb @@ ' a.%=3' ;
165
170
select ' {"a": {"b": 3, "c": "hey"}, "x": [5,6]}' ::jsonb @@ ' %.%="hey"' ;
You can’t perform that action at this time.
0 commit comments