Skip to content

Commit b70ee72

Browse files
committed
roachtest/pg_regress: accept recent diff
Release note: None
1 parent 14583a1 commit b70ee72

File tree

7 files changed

+723
-850
lines changed

7 files changed

+723
-850
lines changed

pkg/cmd/roachtest/testdata/pg_regress/jsonb_jsonpath.diffs

Lines changed: 49 additions & 153 deletions
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ diff -U3 --label=/mnt/data1/postgres/src/test/regress/expected/jsonb_jsonpath.ou
545545
select jsonb_path_query('1', 'lax $[0]');
546546
jsonb_path_query
547547
------------------
548-
@@ -427,58 +402,47 @@
548+
@@ -427,10 +402,11 @@
549549
select jsonb_path_query('[1,2,3]', 'strict $[*].a');
550550
ERROR: jsonpath member accessor can only be applied to an object
551551
select jsonb_path_query('[1,2,3]', 'strict $[*].a', silent => true);
@@ -559,23 +559,11 @@ diff -U3 --label=/mnt/data1/postgres/src/test/regress/expected/jsonb_jsonpath.ou
559559
+ ^
560560
+HINT: try \hf jsonb_path_query
561561
select jsonb_path_query('[]', '$[last]');
562-
- jsonb_path_query
563-
-------------------
564-
-(0 rows)
565-
-
566-
+ERROR: unknown signature: jsonb_path_query(string, string)
567-
+HINT: No function matches the given name and argument types. You might need to add explicit type casts.
568-
select jsonb_path_query('[]', '$[last ? (exists(last))]');
569-
- jsonb_path_query
570-
-------------------
571-
-(0 rows)
572-
-
573-
+ERROR: unknown signature: jsonb_path_query(string, string)
574-
+HINT: No function matches the given name and argument types. You might need to add explicit type casts.
562+
jsonb_path_query
563+
------------------
564+
@@ -444,10 +420,11 @@
575565
select jsonb_path_query('[]', 'strict $[last]');
576-
-ERROR: jsonpath array subscript is out of bounds
577-
+ERROR: unknown signature: jsonb_path_query(string, string)
578-
+HINT: No function matches the given name and argument types. You might need to add explicit type casts.
566+
ERROR: jsonpath array subscript is out of bounds
579567
select jsonb_path_query('[]', 'strict $[last]', silent => true);
580568
- jsonb_path_query
581569
-------------------
@@ -587,29 +575,11 @@ diff -U3 --label=/mnt/data1/postgres/src/test/regress/expected/jsonb_jsonpath.ou
587575
+ ^
588576
+HINT: try \hf jsonb_path_query
589577
select jsonb_path_query('[1]', '$[last]');
590-
- jsonb_path_query
591-
-------------------
592-
- 1
593-
-(1 row)
594-
-
595-
+ERROR: unknown signature: jsonb_path_query(string, string)
596-
+HINT: No function matches the given name and argument types. You might need to add explicit type casts.
597-
select jsonb_path_query('[1,2,3]', '$[last]');
598-
- jsonb_path_query
599-
-------------------
600-
- 3
601-
-(1 row)
602-
-
603-
+ERROR: unknown signature: jsonb_path_query(string, string)
604-
+HINT: No function matches the given name and argument types. You might need to add explicit type casts.
605-
select jsonb_path_query('[1,2,3]', '$[last - 1]');
606-
- jsonb_path_query
607-
-------------------
608-
- 2
609-
-(1 row)
610-
-
611-
+ERROR: unknown signature: jsonb_path_query(string, string)
612-
+HINT: No function matches the given name and argument types. You might need to add explicit type casts.
578+
jsonb_path_query
579+
------------------
580+
@@ -467,18 +444,17 @@
581+
(1 row)
582+
613583
select jsonb_path_query('[1,2,3]', '$[last ? (@.type() == "number")]');
614584
- jsonb_path_query
615585
-------------------
@@ -635,7 +605,7 @@ diff -U3 --label=/mnt/data1/postgres/src/test/regress/expected/jsonb_jsonpath.ou
635605
select * from jsonb_path_query('{"a": 10}', '$');
636606
jsonb_path_query
637607
------------------
638-
@@ -486,13 +450,14 @@
608+
@@ -486,13 +462,14 @@
639609
(1 row)
640610

641611
select * from jsonb_path_query('{"a": 10}', '$ ? (@.a < $value)');
@@ -653,7 +623,7 @@ diff -U3 --label=/mnt/data1/postgres/src/test/regress/expected/jsonb_jsonpath.ou
653623
select * from jsonb_path_query('{"a": 10}', '$ ? (@.a < $value)', '{"value" : 13}');
654624
jsonb_path_query
655625
------------------
656-
@@ -575,274 +540,166 @@
626+
@@ -575,216 +552,136 @@
657627
(0 rows)
658628

659629
select jsonb_path_query('{"a": {"b": 1}}', 'lax $.**');
@@ -964,87 +934,44 @@ diff -U3 --label=/mnt/data1/postgres/src/test/regress/expected/jsonb_jsonpath.ou
964934
+select jsonb '{"a": {"c": {"b": 1}}}' @? '$.**{2 to 3}.b ? ( @ > 0)'
965935
+ ^
966936
select jsonb_path_query('{"g": {"x": 2}}', '$.g ? (exists (@.x))');
967-
- jsonb_path_query
968-
-------------------
969-
- {"x": 2}
970-
-(1 row)
971-
-
972-
+ERROR: unknown signature: jsonb_path_query(string, string)
973-
+HINT: No function matches the given name and argument types. You might need to add explicit type casts.
974-
select jsonb_path_query('{"g": {"x": 2}}', '$.g ? (exists (@.y))');
975-
- jsonb_path_query
976-
-------------------
977-
-(0 rows)
978-
-
979-
+ERROR: unknown signature: jsonb_path_query(string, string)
980-
+HINT: No function matches the given name and argument types. You might need to add explicit type casts.
981-
select jsonb_path_query('{"g": {"x": 2}}', '$.g ? (exists (@.x ? (@ >= 2) ))');
982-
- jsonb_path_query
983-
-------------------
984-
- {"x": 2}
985-
-(1 row)
986-
-
987-
+ERROR: unknown signature: jsonb_path_query(string, string)
988-
+HINT: No function matches the given name and argument types. You might need to add explicit type casts.
989-
select jsonb_path_query('{"g": [{"x": 2}, {"y": 3}]}', 'lax $.g ? (exists (@.x))');
990-
- jsonb_path_query
991-
-------------------
992-
- {"x": 2}
993-
-(1 row)
994-
-
995-
+ERROR: unknown signature: jsonb_path_query(string, string)
996-
+HINT: No function matches the given name and argument types. You might need to add explicit type casts.
997-
select jsonb_path_query('{"g": [{"x": 2}, {"y": 3}]}', 'lax $.g ? (exists (@.x + "3"))');
998-
- jsonb_path_query
999-
-------------------
1000-
-(0 rows)
1001-
-
1002-
+ERROR: unknown signature: jsonb_path_query(string, string)
1003-
+HINT: No function matches the given name and argument types. You might need to add explicit type casts.
937+
jsonb_path_query
938+
------------------
939+
@@ -816,9 +713,7 @@
1004940
select jsonb_path_query('{"g": [{"x": 2}, {"y": 3}]}', 'lax $.g ? ((exists (@.x + "3")) is unknown)');
1005-
- jsonb_path_query
1006-
-------------------
941+
jsonb_path_query
942+
------------------
1007943
- {"x": 2}
1008944
- {"y": 3}
1009945
-(2 rows)
1010-
-
1011-
+ERROR: unknown signature: jsonb_path_query(string, string)
1012-
+HINT: No function matches the given name and argument types. You might need to add explicit type casts.
946+
+(0 rows)
947+
1013948
select jsonb_path_query('{"g": [{"x": 2}, {"y": 3}]}', 'strict $.g[*] ? (exists (@.x))');
1014-
- jsonb_path_query
1015-
-------------------
1016-
- {"x": 2}
1017-
-(1 row)
1018-
-
1019-
+ERROR: unknown signature: jsonb_path_query(string, string)
1020-
+HINT: No function matches the given name and argument types. You might need to add explicit type casts.
949+
jsonb_path_query
950+
@@ -829,8 +724,7 @@
1021951
select jsonb_path_query('{"g": [{"x": 2}, {"y": 3}]}', 'strict $.g[*] ? ((exists (@.x)) is unknown)');
1022-
- jsonb_path_query
1023-
-------------------
952+
jsonb_path_query
953+
------------------
1024954
- {"y": 3}
1025955
-(1 row)
1026-
-
1027-
+ERROR: unknown signature: jsonb_path_query(string, string)
1028-
+HINT: No function matches the given name and argument types. You might need to add explicit type casts.
956+
+(0 rows)
957+
1029958
select jsonb_path_query('{"g": [{"x": 2}, {"y": 3}]}', 'strict $.g ? (exists (@[*].x))');
1030-
- jsonb_path_query
1031-
-------------------
1032-
-(0 rows)
1033-
-
1034-
+ERROR: unknown signature: jsonb_path_query(string, string)
1035-
+HINT: No function matches the given name and argument types. You might need to add explicit type casts.
959+
jsonb_path_query
960+
@@ -838,10 +732,9 @@
961+
(0 rows)
962+
1036963
select jsonb_path_query('{"g": [{"x": 2}, {"y": 3}]}', 'strict $.g ? ((exists (@[*].x)) is unknown)');
1037964
- jsonb_path_query
1038965
-----------------------
1039966
- [{"x": 2}, {"y": 3}]
1040967
-(1 row)
1041-
-
1042-
+ERROR: unknown signature: jsonb_path_query(string, string)
1043-
+HINT: No function matches the given name and argument types. You might need to add explicit type casts.
968+
+ jsonb_path_query
969+
+------------------
970+
+(0 rows)
971+
1044972
--test ternary logic
1045973
select
1046-
x, y,
1047-
@@ -856,19 +713,7 @@
974+
@@ -856,19 +749,7 @@
1048975
from
1049976
(values (jsonb 'true'), ('false'), ('"null"')) x(x),
1050977
(values (jsonb 'true'), ('false'), ('"null"')) y(y);
@@ -1065,7 +992,7 @@ diff -U3 --label=/mnt/data1/postgres/src/test/regress/expected/jsonb_jsonpath.ou
1065992
select
1066993
x, y,
1067994
jsonb_path_query(
1068-
@@ -881,157 +726,114 @@
995+
@@ -881,157 +762,114 @@
1069996
from
1070997
(values (jsonb 'true'), ('false'), ('"null"')) x(x),
1071998
(values (jsonb 'true'), ('false'), ('"null"')) y(y);
@@ -1308,37 +1235,19 @@ diff -U3 --label=/mnt/data1/postgres/src/test/regress/expected/jsonb_jsonpath.ou
13081235
-- arithmetic errors
13091236
select jsonb_path_query('[1,2,0,3]', '$[*] ? (2 / @ > 0)');
13101237
jsonb_path_query
1311-
@@ -1042,70 +844,69 @@
1312-
(3 rows)
1313-
1238+
@@ -1044,8 +882,7 @@
13141239
select jsonb_path_query('[1,2,0,3]', '$[*] ? ((2 / @ > 0) is unknown)');
1315-
- jsonb_path_query
1316-
-------------------
1240+
jsonb_path_query
1241+
------------------
13171242
- 0
13181243
-(1 row)
1319-
-
1320-
+ERROR: unknown signature: jsonb_path_query(string, string)
1321-
+HINT: No function matches the given name and argument types. You might need to add explicit type casts.
1244+
+(0 rows)
1245+
13221246
select jsonb_path_query('0', '1 / $');
13231247
ERROR: division by zero
1324-
select jsonb_path_query('0', '1 / $ + 2');
1325-
ERROR: division by zero
1326-
select jsonb_path_query('0', '-(3 + 1 % $)');
1327-
-ERROR: division by zero
1328-
+ERROR: unknown signature: jsonb_path_query(string, string)
1329-
+HINT: No function matches the given name and argument types. You might need to add explicit type casts.
1330-
select jsonb_path_query('1', '$ + "2"');
1331-
ERROR: right operand of jsonpath operator + is not a single numeric value
1332-
select jsonb_path_query('[1, 2]', '3 * $');
1333-
ERROR: right operand of jsonpath operator * is not a single numeric value
1334-
select jsonb_path_query('"a"', '-$');
1335-
-ERROR: operand of unary jsonpath operator - is not a numeric value
1336-
+ERROR: unknown signature: jsonb_path_query(string, string)
1337-
+HINT: No function matches the given name and argument types. You might need to add explicit type casts.
1248+
@@ -1062,50 +899,49 @@
13381249
select jsonb_path_query('[1,"2",3]', '+$');
1339-
-ERROR: operand of unary jsonpath operator + is not a numeric value
1340-
+ERROR: unknown signature: jsonb_path_query(string, string)
1341-
+HINT: No function matches the given name and argument types. You might need to add explicit type casts.
1250+
ERROR: operand of unary jsonpath operator + is not a numeric value
13421251
select jsonb_path_query('1', '$ + "2"', silent => true);
13431252
- jsonb_path_query
13441253
-------------------
@@ -1423,20 +1332,7 @@ diff -U3 --label=/mnt/data1/postgres/src/test/regress/expected/jsonb_jsonpath.ou
14231332
-- unwrapping of operator arguments in lax mode
14241333
select jsonb_path_query('{"a": [2]}', 'lax $.a * 3');
14251334
jsonb_path_query
1426-
@@ -1120,21 +921,17 @@
1427-
(1 row)
1428-
1429-
select jsonb_path_query('{"a": [2, 3, 4]}', 'lax -$.a');
1430-
- jsonb_path_query
1431-
-------------------
1432-
- -2
1433-
- -3
1434-
- -4
1435-
-(3 rows)
1436-
-
1437-
+ERROR: unknown signature: jsonb_path_query(string, string)
1438-
+HINT: No function matches the given name and argument types. You might need to add explicit type casts.
1439-
-- should fail
1335+
@@ -1131,10 +967,11 @@
14401336
select jsonb_path_query('{"a": [1, 2]}', 'lax $.a * 3');
14411337
ERROR: left operand of jsonpath operator * is not a single numeric value
14421338
select jsonb_path_query('{"a": [1, 2]}', 'lax $.a * 3', silent => true);
@@ -1452,7 +1348,7 @@ diff -U3 --label=/mnt/data1/postgres/src/test/regress/expected/jsonb_jsonpath.ou
14521348
-- extension: boolean expressions
14531349
select jsonb_path_query('2', '$ > 1');
14541350
jsonb_path_query
1455-
@@ -1155,437 +952,287 @@
1351+
@@ -1155,437 +992,287 @@
14561352
(1 row)
14571353

14581354
select jsonb '2' @? '$ == "2"';
@@ -2093,7 +1989,7 @@ diff -U3 --label=/mnt/data1/postgres/src/test/regress/expected/jsonb_jsonpath.ou
20931989
select jsonb_path_query('[null, 1, "abc", "abd", "aBdC", "abdacb", "babc", "adc\nabc", "ab\nadc"]', 'lax $[*] ? (@ like_regex "^ab.*c")');
20941990
jsonb_path_query
20951991
------------------
2096-
@@ -1594,625 +1241,376 @@
1992+
@@ -1594,625 +1281,376 @@
20971993
(2 rows)
20981994

20991995
select jsonb_path_query('[null, 1, "abc", "abd", "aBdC", "abdacb", "babc", "adc\nabc", "ab\nadc"]', 'lax $[*] ? (@ like_regex "^ab.*c" flag "i")');
@@ -2916,7 +2812,7 @@ diff -U3 --label=/mnt/data1/postgres/src/test/regress/expected/jsonb_jsonpath.ou
29162812
set time zone default;
29172813
-- jsonpath operators
29182814
SELECT jsonb_path_query('[{"a": 1}, {"a": 2}]', '$[*]');
2919-
@@ -2236,95 +1634,85 @@
2815+
@@ -2236,95 +1674,85 @@
29202816
(1 row)
29212817

29222818
SELECT jsonb_path_query_array('[{"a": 1}, {"a": 2}, {}]', 'strict $[*].a');
@@ -3075,7 +2971,7 @@ diff -U3 --label=/mnt/data1/postgres/src/test/regress/expected/jsonb_jsonpath.ou
30752971
SELECT jsonb_path_exists('[{"a": 1}, {"a": 2}]', '$[*].a ? (@ > 1)');
30762972
jsonb_path_exists
30772973
-------------------
3078-
@@ -2332,19 +1720,19 @@
2974+
@@ -2332,19 +1760,19 @@
30792975
(1 row)
30802976

30812977
SELECT jsonb_path_exists('[{"a": 1}, {"a": 2}, {"a": 3}, {"a": 5}]', '$[*] ? (@.a > $min && @.a < $max)', vars => '{"min": 1, "max": 4}');
@@ -3106,7 +3002,7 @@ diff -U3 --label=/mnt/data1/postgres/src/test/regress/expected/jsonb_jsonpath.ou
31063002
SELECT jsonb_path_exists('[{"a": 1}]', 'false');
31073003
jsonb_path_exists
31083004
-------------------
3109-
@@ -2352,75 +1740,93 @@
3005+
@@ -2352,75 +1780,93 @@
31103006
(1 row)
31113007

31123008
SELECT jsonb_path_match('true', '$', silent => false);
@@ -3253,7 +3149,7 @@ diff -U3 --label=/mnt/data1/postgres/src/test/regress/expected/jsonb_jsonpath.ou
32533149
-- test string comparison (Unicode codepoint collation)
32543150
WITH str(j, num) AS
32553151
(
3256-
@@ -2436,151 +1842,15 @@
3152+
@@ -2436,151 +1882,15 @@
32573153
jsonb_path_query_first(s1.j, '$.s > $s', vars => s2.j) gt
32583154
FROM str s1, str s2
32593155
ORDER BY s1.num, s2.num;

0 commit comments

Comments
 (0)