forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit6ee3020
committed
SQL/JSON: support the IS JSON predicate
This patch introduces the SQL standard IS JSON predicate. It operateson text and bytea values representing JSON, as well as on the json andjsonb types. Each test has IS and IS NOT variants and supports a WITHUNIQUE KEYS flag. The tests are:IS JSON [VALUE]IS JSON ARRAYIS JSON OBJECTIS JSON SCALARThese should be self-explanatory.The WITH UNIQUE KEYS flag makes these return false when duplicate keysexist in any object within the value, not necessarily directly containedin the outermost object.Author: Nikita Glukhov <n.gluhov@postgrespro.ru>Author: Teodor Sigaev <teodor@sigaev.ru>Author: Oleg Bartunov <obartunov@gmail.com>Author: Alexander Korotkov <aekorotkov@gmail.com>Author: Amit Langote <amitlangote09@gmail.com>Author: Andrew Dunstan <andrew@dunslane.net>Reviewers have included (in no particular order) Andres Freund, AlexanderKorotkov, Pavel Stehule, Andrew Alsup, Erik Rijkers, Zihong Yu,Himanshu Upadhyaya, Daniel Gustafsson, Justin Pryzby.Discussion:https://postgr.es/m/CAF4Au4w2x-5LTnN_bxky-mq4=WOqsGsxSpENCzHRAzSnEd8+WQ@mail.gmail.comDiscussion:https://postgr.es/m/cd0bb935-0158-78a7-08b5-904886deac4b@postgrespro.ruDiscussion:https://postgr.es/m/20220616233130.rparivafipt6doj3@alap3.anarazel.deDiscussion:https://postgr.es/m/abd9b83b-aa66-f230-3d6d-734817f0995d%40postgresql.org1 parenta2a0c7c commit6ee3020
File tree
25 files changed
+1030
-67
lines changed- doc/src/sgml
- src
- backend
- executor
- jit/llvm
- nodes
- parser
- utils/adt
- include
- catalog
- executor
- nodes
- parser
- utils
- interfaces/ecpg/test
- expected
- sql
- test/regress
- expected
- sql
25 files changed
+1030
-67
lines changedLines changed: 80 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
16005 | 16005 |
| |
16006 | 16006 |
| |
16007 | 16007 |
| |
| 16008 | + | |
| 16009 | + | |
| 16010 | + | |
| 16011 | + | |
| 16012 | + | |
| 16013 | + | |
| 16014 | + | |
| 16015 | + | |
| 16016 | + | |
| 16017 | + | |
| 16018 | + | |
| 16019 | + | |
| 16020 | + | |
| 16021 | + | |
| 16022 | + | |
| 16023 | + | |
| 16024 | + | |
| 16025 | + | |
| 16026 | + | |
| 16027 | + | |
| 16028 | + | |
| 16029 | + | |
| 16030 | + | |
| 16031 | + | |
| 16032 | + | |
| 16033 | + | |
| 16034 | + | |
| 16035 | + | |
| 16036 | + | |
| 16037 | + | |
| 16038 | + | |
| 16039 | + | |
| 16040 | + | |
| 16041 | + | |
| 16042 | + | |
| 16043 | + | |
| 16044 | + | |
| 16045 | + | |
| 16046 | + | |
| 16047 | + | |
| 16048 | + | |
| 16049 | + | |
| 16050 | + | |
| 16051 | + | |
| 16052 | + | |
| 16053 | + | |
| 16054 | + | |
| 16055 | + | |
| 16056 | + | |
| 16057 | + | |
| 16058 | + | |
| 16059 | + | |
| 16060 | + | |
| 16061 | + | |
| 16062 | + | |
| 16063 | + | |
| 16064 | + | |
| 16065 | + | |
| 16066 | + | |
| 16067 | + | |
| 16068 | + | |
| 16069 | + | |
| 16070 | + | |
| 16071 | + | |
| 16072 | + | |
| 16073 | + | |
| 16074 | + | |
| 16075 | + | |
| 16076 | + | |
| 16077 | + | |
| 16078 | + | |
| 16079 | + | |
| 16080 | + | |
| 16081 | + | |
| 16082 | + | |
| 16083 | + | |
| 16084 | + | |
| 16085 | + | |
| 16086 | + | |
| 16087 | + | |
16008 | 16088 |
| |
16009 | 16089 |
| |
16010 | 16090 |
| |
|
Lines changed: 13 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2370 | 2370 |
| |
2371 | 2371 |
| |
2372 | 2372 |
| |
| 2373 | + | |
| 2374 | + | |
| 2375 | + | |
| 2376 | + | |
| 2377 | + | |
| 2378 | + | |
| 2379 | + | |
| 2380 | + | |
| 2381 | + | |
| 2382 | + | |
| 2383 | + | |
| 2384 | + | |
| 2385 | + | |
2373 | 2386 |
| |
2374 | 2387 |
| |
2375 | 2388 |
| |
|
Lines changed: 99 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
73 | 73 |
| |
74 | 74 |
| |
75 | 75 |
| |
| 76 | + | |
76 | 77 |
| |
77 | 78 |
| |
78 | 79 |
| |
| |||
477 | 478 |
| |
478 | 479 |
| |
479 | 480 |
| |
| 481 | + | |
480 | 482 |
| |
481 | 483 |
| |
482 | 484 |
| |
| |||
1521 | 1523 |
| |
1522 | 1524 |
| |
1523 | 1525 |
| |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
1524 | 1534 |
| |
1525 | 1535 |
| |
1526 | 1536 |
| |
| |||
3921 | 3931 |
| |
3922 | 3932 |
| |
3923 | 3933 |
| |
| 3934 | + | |
| 3935 | + | |
| 3936 | + | |
| 3937 | + | |
| 3938 | + | |
| 3939 | + | |
| 3940 | + | |
| 3941 | + | |
| 3942 | + | |
| 3943 | + | |
| 3944 | + | |
| 3945 | + | |
| 3946 | + | |
| 3947 | + | |
| 3948 | + | |
| 3949 | + | |
| 3950 | + | |
| 3951 | + | |
| 3952 | + | |
| 3953 | + | |
| 3954 | + | |
| 3955 | + | |
| 3956 | + | |
| 3957 | + | |
| 3958 | + | |
| 3959 | + | |
| 3960 | + | |
| 3961 | + | |
| 3962 | + | |
| 3963 | + | |
| 3964 | + | |
| 3965 | + | |
| 3966 | + | |
| 3967 | + | |
| 3968 | + | |
| 3969 | + | |
| 3970 | + | |
| 3971 | + | |
| 3972 | + | |
| 3973 | + | |
| 3974 | + | |
| 3975 | + | |
| 3976 | + | |
| 3977 | + | |
| 3978 | + | |
| 3979 | + | |
| 3980 | + | |
| 3981 | + | |
| 3982 | + | |
| 3983 | + | |
| 3984 | + | |
| 3985 | + | |
| 3986 | + | |
| 3987 | + | |
| 3988 | + | |
| 3989 | + | |
| 3990 | + | |
| 3991 | + | |
| 3992 | + | |
| 3993 | + | |
| 3994 | + | |
| 3995 | + | |
| 3996 | + | |
| 3997 | + | |
| 3998 | + | |
| 3999 | + | |
| 4000 | + | |
| 4001 | + | |
| 4002 | + | |
| 4003 | + | |
| 4004 | + | |
| 4005 | + | |
| 4006 | + | |
| 4007 | + | |
| 4008 | + | |
| 4009 | + | |
| 4010 | + | |
| 4011 | + | |
| 4012 | + | |
| 4013 | + | |
| 4014 | + | |
| 4015 | + | |
| 4016 | + | |
| 4017 | + | |
| 4018 | + | |
| 4019 | + | |
| 4020 | + | |
| 4021 | + | |
| 4022 | + | |
3924 | 4023 |
| |
3925 | 4024 |
| |
3926 | 4025 |
| |
|
Lines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1848 | 1848 |
| |
1849 | 1849 |
| |
1850 | 1850 |
| |
| 1851 | + | |
| 1852 | + | |
| 1853 | + | |
| 1854 | + | |
| 1855 | + | |
| 1856 | + | |
1851 | 1857 |
| |
1852 | 1858 |
| |
1853 | 1859 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
133 | 133 |
| |
134 | 134 |
| |
135 | 135 |
| |
| 136 | + | |
136 | 137 |
| |
137 | 138 |
| |
138 | 139 |
| |
|
Lines changed: 19 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
894 | 894 |
| |
895 | 895 |
| |
896 | 896 |
| |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + |
Lines changed: 26 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
261 | 261 |
| |
262 | 262 |
| |
263 | 263 |
| |
| 264 | + | |
| 265 | + | |
| 266 | + | |
264 | 267 |
| |
265 | 268 |
| |
266 | 269 |
| |
| |||
983 | 986 |
| |
984 | 987 |
| |
985 | 988 |
| |
| 989 | + | |
| 990 | + | |
| 991 | + | |
986 | 992 |
| |
987 | 993 |
| |
988 | 994 |
| |
| |||
1205 | 1211 |
| |
1206 | 1212 |
| |
1207 | 1213 |
| |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
1208 | 1217 |
| |
1209 | 1218 |
| |
1210 | 1219 |
| |
| |||
1653 | 1662 |
| |
1654 | 1663 |
| |
1655 | 1664 |
| |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
1656 | 1668 |
| |
1657 | 1669 |
| |
1658 | 1670 |
| |
| |||
2406 | 2418 |
| |
2407 | 2419 |
| |
2408 | 2420 |
| |
| 2421 | + | |
| 2422 | + | |
2409 | 2423 |
| |
2410 | 2424 |
| |
2411 | 2425 |
| |
| |||
3413 | 3427 |
| |
3414 | 3428 |
| |
3415 | 3429 |
| |
| 3430 | + | |
| 3431 | + | |
| 3432 | + | |
| 3433 | + | |
| 3434 | + | |
| 3435 | + | |
| 3436 | + | |
| 3437 | + | |
| 3438 | + | |
| 3439 | + | |
3416 | 3440 |
| |
3417 | 3441 |
| |
3418 | 3442 |
| |
| |||
4261 | 4285 |
| |
4262 | 4286 |
| |
4263 | 4287 |
| |
| 4288 | + | |
| 4289 | + | |
4264 | 4290 |
| |
4265 | 4291 |
| |
4266 | 4292 |
| |
|
0 commit comments
Comments
(0)