forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit606948b
committed
SQL JSON functions
This Patch introduces three SQL standard JSON functions:JSON() (incorrectly mentioned in my commit message forf4fb45d)JSON_SCALAR()JSON_SERIALIZE()JSON() produces json values from text, bytea, json or jsonb values, andhas facilitites for handling duplicate keys.JSON_SCALAR() produces a json value from any scalar sql value, includingjson and jsonb.JSON_SERIALIZE() produces text or bytea from input which containis orrepresents json or jsonb;For the most part these functions don't add any significant newcapabilities, but they will be of use to users wanting standardcompliant JSON handling.Nikita GlukhovReviewers 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/cd0bb935-0158-78a7-08b5-904886deac4b@postgrespro.ru1 parent8e053dc commit606948b
File tree
22 files changed
+880
-82
lines changed- doc/src/sgml/keywords
- src
- backend
- executor
- nodes
- parser
- utils/adt
- include
- executor
- nodes
- parser
- utils
- test/regress
- expected
- sql
22 files changed
+880
-82
lines changedLines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
156 | 156 |
| |
157 | 157 |
| |
158 | 158 |
| |
| 159 | + | |
159 | 160 |
| |
160 | 161 |
| |
161 | 162 |
| |
162 | 163 |
| |
163 | 164 |
| |
164 | 165 |
| |
| 166 | + | |
| 167 | + | |
165 | 168 |
| |
166 | 169 |
| |
167 | 170 |
| |
|
Lines changed: 45 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
47 | 47 |
| |
48 | 48 |
| |
49 | 49 |
| |
| 50 | + | |
| 51 | + | |
50 | 52 |
| |
51 | 53 |
| |
52 | 54 |
| |
| |||
2460 | 2462 |
| |
2461 | 2463 |
| |
2462 | 2464 |
| |
| 2465 | + | |
| 2466 | + | |
| 2467 | + | |
| 2468 | + | |
| 2469 | + | |
| 2470 | + | |
2463 | 2471 |
| |
2464 | 2472 |
| |
2465 | 2473 |
| |
| |||
2492 | 2500 |
| |
2493 | 2501 |
| |
2494 | 2502 |
| |
| 2503 | + | |
| 2504 | + | |
| 2505 | + | |
| 2506 | + | |
| 2507 | + | |
| 2508 | + | |
| 2509 | + | |
| 2510 | + | |
| 2511 | + | |
| 2512 | + | |
| 2513 | + | |
| 2514 | + | |
| 2515 | + | |
| 2516 | + | |
| 2517 | + | |
| 2518 | + | |
| 2519 | + | |
| 2520 | + | |
| 2521 | + | |
| 2522 | + | |
| 2523 | + | |
| 2524 | + | |
| 2525 | + | |
| 2526 | + | |
| 2527 | + | |
| 2528 | + | |
| 2529 | + | |
| 2530 | + | |
| 2531 | + | |
| 2532 | + | |
| 2533 | + | |
| 2534 | + | |
| 2535 | + | |
| 2536 | + | |
| 2537 | + | |
| 2538 | + | |
| 2539 | + | |
2495 | 2540 |
| |
2496 | 2541 |
| |
2497 | 2542 |
| |
|
Lines changed: 41 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3982 | 3982 |
| |
3983 | 3983 |
| |
3984 | 3984 |
| |
3985 |
| - | |
| 3985 | + | |
3986 | 3986 |
| |
3987 | 3987 |
| |
3988 | 3988 |
| |
| |||
4527 | 4527 |
| |
4528 | 4528 |
| |
4529 | 4529 |
| |
| 4530 | + | |
| 4531 | + | |
| 4532 | + | |
| 4533 | + | |
| 4534 | + | |
| 4535 | + | |
| 4536 | + | |
| 4537 | + | |
| 4538 | + | |
| 4539 | + | |
| 4540 | + | |
| 4541 | + | |
| 4542 | + | |
| 4543 | + | |
| 4544 | + | |
| 4545 | + | |
| 4546 | + | |
| 4547 | + | |
| 4548 | + | |
| 4549 | + | |
| 4550 | + | |
| 4551 | + | |
| 4552 | + | |
| 4553 | + | |
| 4554 | + | |
| 4555 | + | |
| 4556 | + | |
| 4557 | + | |
| 4558 | + | |
| 4559 | + | |
| 4560 | + | |
| 4561 | + | |
| 4562 | + | |
| 4563 | + | |
| 4564 | + | |
| 4565 | + | |
| 4566 | + | |
| 4567 | + | |
| 4568 | + | |
| 4569 | + | |
4530 | 4570 |
| |
4531 | 4571 |
| |
4532 | 4572 |
| |
|
Lines changed: 53 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2345 | 2345 |
| |
2346 | 2346 |
| |
2347 | 2347 |
| |
| 2348 | + | |
| 2349 | + | |
| 2350 | + | |
| 2351 | + | |
| 2352 | + | |
| 2353 | + | |
| 2354 | + | |
| 2355 | + | |
| 2356 | + | |
| 2357 | + | |
| 2358 | + | |
| 2359 | + | |
| 2360 | + | |
| 2361 | + | |
| 2362 | + | |
| 2363 | + | |
| 2364 | + | |
| 2365 | + | |
| 2366 | + | |
| 2367 | + | |
| 2368 | + | |
| 2369 | + | |
| 2370 | + | |
| 2371 | + | |
| 2372 | + | |
| 2373 | + | |
| 2374 | + | |
| 2375 | + | |
| 2376 | + | |
| 2377 | + | |
| 2378 | + | |
| 2379 | + | |
| 2380 | + | |
| 2381 | + | |
| 2382 | + | |
| 2383 | + | |
| 2384 | + | |
| 2385 | + | |
| 2386 | + | |
| 2387 | + | |
| 2388 | + | |
| 2389 | + | |
| 2390 | + | |
| 2391 | + | |
2348 | 2392 |
| |
2349 | 2393 |
| |
2350 | 2394 |
| |
| |||
5744 | 5788 |
| |
5745 | 5789 |
| |
5746 | 5790 |
| |
| 5791 | + | |
| 5792 | + | |
| 5793 | + | |
| 5794 | + | |
| 5795 | + | |
| 5796 | + | |
| 5797 | + | |
| 5798 | + | |
| 5799 | + | |
5747 | 5800 |
| |
5748 | 5801 |
| |
5749 | 5802 |
| |
|
Lines changed: 38 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
871 | 871 |
| |
872 | 872 |
| |
873 | 873 |
| |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
874 | 903 |
| |
875 | 904 |
| |
876 | 905 |
| |
| |||
3661 | 3690 |
| |
3662 | 3691 |
| |
3663 | 3692 |
| |
| 3693 | + | |
| 3694 | + | |
| 3695 | + | |
| 3696 | + | |
| 3697 | + | |
| 3698 | + | |
| 3699 | + | |
| 3700 | + | |
| 3701 | + | |
3664 | 3702 |
| |
3665 | 3703 |
| |
3666 | 3704 |
| |
|
Lines changed: 14 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4363 | 4363 |
| |
4364 | 4364 |
| |
4365 | 4365 |
| |
| 4366 | + | |
| 4367 | + | |
| 4368 | + | |
| 4369 | + | |
| 4370 | + | |
| 4371 | + | |
| 4372 | + | |
| 4373 | + | |
| 4374 | + | |
| 4375 | + | |
| 4376 | + | |
| 4377 | + | |
| 4378 | + | |
| 4379 | + | |
4366 | 4380 |
| |
4367 | 4381 |
| |
4368 | 4382 |
| |
|
0 commit comments
Comments
(0)