forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitaa6e46d
committed
Throw error when assigning jsonb scalar instead of a composite object
During the jsonb subscripting assignment, the provided path might assume anobject or an array where the source jsonb has a scalar value. Initialsubscripting assignment logic will skip such an update operation with nomessage shown. This commit makes it throw an error to indicate this typeof situation.Discussion:https://postgr.es/m/CA%2Bq6zcV8qvGcDXurwwgUbwACV86Th7G80pnubg42e-p9gsSf%3Dg%40mail.gmail.comDiscussion:https://postgr.es/m/CA%2Bq6zcX3mdxGCgdThzuySwH-ApyHHM-G4oB1R0fn0j2hZqqkLQ%40mail.gmail.comDiscussion:https://postgr.es/m/CA%2Bq6zcVDuGBv%3DM0FqBYX8DPebS3F_0KQ6OVFobGJPM507_SZ_w%40mail.gmail.comDiscussion:https://postgr.es/m/CA%2Bq6zcVovR%2BXY4mfk-7oNk-rF91gH0PebnNfuUjuuDsyHjOcVA%40mail.gmail.comAuthor: Dmitry DolgovReviewed-by: Tom Lane, Arthur Zakirov, Pavel Stehule, Dian M FayReviewed-by: Andrew Dunstan, Chapman Flack, Merlin Moncure, Peter GeogheganReviewed-by: Alvaro Herrera, Jim Nasby, Josh Berkus, Victor WagnerReviewed-by: Aleksander Alekseev, Robert Haas, Oleg Bartunov1 parent81fcc72 commitaa6e46d
File tree
4 files changed
+104
-8
lines changed- doc/src/sgml
- src
- backend/utils/adt
- test/regress
- expected
- sql
4 files changed
+104
-8
lines changedLines changed: 31 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
614 | 614 |
| |
615 | 615 |
| |
616 | 616 |
| |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
617 | 632 |
| |
618 | 633 |
| |
| 634 | + | |
619 | 635 |
| |
620 | 636 |
| |
621 | 637 |
| |
| |||
631 | 647 |
| |
632 | 648 |
| |
633 | 649 |
| |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
634 | 654 |
| |
635 | 655 |
| |
636 | 656 |
| |
| |||
639 | 659 |
| |
640 | 660 |
| |
641 | 661 |
| |
642 |
| - | |
643 |
| - | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
644 | 665 |
| |
645 | 666 |
| |
646 | 667 |
| |
| |||
661 | 682 |
| |
662 | 683 |
| |
663 | 684 |
| |
664 |
| - | |
665 |
| - | |
666 |
| - | |
667 |
| - | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
668 | 691 |
| |
669 | 692 |
| |
670 | 693 |
| |
671 | 694 |
| |
672 | 695 |
| |
673 |
| - | |
674 |
| - | |
| 696 | + | |
| 697 | + | |
675 | 698 |
| |
676 | 699 |
| |
677 | 700 |
| |
|
Lines changed: 29 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4931 | 4931 |
| |
4932 | 4932 |
| |
4933 | 4933 |
| |
| 4934 | + | |
| 4935 | + | |
| 4936 | + | |
| 4937 | + | |
| 4938 | + | |
| 4939 | + | |
| 4940 | + | |
| 4941 | + | |
| 4942 | + | |
| 4943 | + | |
| 4944 | + | |
| 4945 | + | |
| 4946 | + | |
| 4947 | + | |
| 4948 | + | |
4934 | 4949 |
| |
4935 | 4950 |
| |
4936 | 4951 |
| |
| |||
4948 | 4963 |
| |
4949 | 4964 |
| |
4950 | 4965 |
| |
| 4966 | + | |
| 4967 | + | |
| 4968 | + | |
| 4969 | + | |
| 4970 | + | |
| 4971 | + | |
| 4972 | + | |
| 4973 | + | |
| 4974 | + | |
| 4975 | + | |
| 4976 | + | |
| 4977 | + | |
| 4978 | + | |
| 4979 | + | |
4951 | 4980 |
| |
4952 | 4981 |
| |
4953 | 4982 |
| |
|
Lines changed: 27 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5134 | 5134 |
| |
5135 | 5135 |
| |
5136 | 5136 |
| |
| 5137 | + | |
| 5138 | + | |
| 5139 | + | |
| 5140 | + | |
| 5141 | + | |
| 5142 | + | |
| 5143 | + | |
| 5144 | + | |
| 5145 | + | |
| 5146 | + | |
| 5147 | + | |
| 5148 | + | |
| 5149 | + | |
| 5150 | + | |
| 5151 | + | |
| 5152 | + | |
| 5153 | + | |
| 5154 | + | |
| 5155 | + | |
| 5156 | + | |
| 5157 | + | |
| 5158 | + | |
| 5159 | + | |
| 5160 | + | |
| 5161 | + | |
| 5162 | + | |
| 5163 | + | |
5137 | 5164 |
| |
5138 | 5165 |
| |
5139 | 5166 |
| |
|
Lines changed: 17 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1371 | 1371 |
| |
1372 | 1372 |
| |
1373 | 1373 |
| |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
1374 | 1391 |
| |
1375 | 1392 |
| |
1376 | 1393 |
| |
|
0 commit comments
Comments
(0)