- Notifications
You must be signed in to change notification settings - Fork28
Commit38d30a1
committed
Remove "invalid concatenation of jsonb objects" error case.
The jsonb || jsonb operator arbitrarily rejected certain combinationsof scalar and non-scalar inputs, while being willing to concatenateother combinations. This was of course quite undocumented. Ratherthan trying to document it, let's just remove the restriction,creating a uniform rule that unless we are handling an object-to-objectconcatenation, non-array inputs are converted to one-element arrays,resulting in an array-to-array concatenation. (This does not changethe behavior for any case that didn't throw an error before.)Per complaint from Joel Jacobson. Back-patch to all supported branches.Discussion:https://postgr.es/m/163099.1608312033@sss.pgh.pa.us1 parentbe9c3cd commit38d30a1
File tree
4 files changed
+99
-47
lines changed- doc/src/sgml
- src
- backend/utils/adt
- test/regress
- expected
- sql
4 files changed
+99
-47
lines changedLines changed: 21 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
14736 | 14736 |
| |
14737 | 14737 |
| |
14738 | 14738 |
| |
14739 |
| - | |
| 14739 | + | |
| 14740 | + | |
| 14741 | + | |
14740 | 14742 |
| |
| 14743 | + | |
| 14744 | + | |
14741 | 14745 |
| |
14742 | 14746 |
| |
14743 | 14747 |
| |
| |||
14748 | 14752 |
| |
14749 | 14753 |
| |
14750 | 14754 |
| |
| 14755 | + | |
| 14756 | + | |
| 14757 | + | |
| 14758 | + | |
| 14759 | + | |
| 14760 | + | |
| 14761 | + | |
| 14762 | + | |
| 14763 | + | |
| 14764 | + | |
| 14765 | + | |
| 14766 | + | |
| 14767 | + | |
| 14768 | + | |
| 14769 | + | |
| 14770 | + | |
14751 | 14771 |
| |
14752 | 14772 |
| |
14753 | 14773 |
| |
|
Lines changed: 39 additions & 44 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4687 | 4687 |
| |
4688 | 4688 |
| |
4689 | 4689 |
| |
4690 |
| - | |
4691 |
| - | |
| 4690 | + | |
| 4691 | + | |
4692 | 4692 |
| |
4693 | 4693 |
| |
4694 |
| - | |
| 4694 | + | |
| 4695 | + | |
4695 | 4696 |
| |
4696 | 4697 |
| |
4697 | 4698 |
| |
4698 | 4699 |
| |
4699 |
| - | |
| 4700 | + | |
| 4701 | + | |
| 4702 | + | |
4700 | 4703 |
| |
4701 | 4704 |
| |
4702 |
| - | |
| 4705 | + | |
4703 | 4706 |
| |
4704 | 4707 |
| |
4705 | 4708 |
| |
4706 | 4709 |
| |
4707 |
| - | |
4708 |
| - | |
| 4710 | + | |
| 4711 | + | |
| 4712 | + | |
4709 | 4713 |
| |
4710 | 4714 |
| |
4711 | 4715 |
| |
4712 | 4716 |
| |
4713 |
| - | |
4714 |
| - | |
4715 |
| - | |
4716 |
| - | |
4717 | 4717 |
| |
4718 | 4718 |
| |
4719 |
| - | |
| 4719 | + | |
| 4720 | + | |
| 4721 | + | |
| 4722 | + | |
4720 | 4723 |
| |
4721 | 4724 |
| |
4722 | 4725 |
| |
| |||
4732 | 4735 |
| |
4733 | 4736 |
| |
4734 | 4737 |
| |
4735 |
| - | |
4736 |
| - | |
4737 |
| - | |
| 4738 | + | |
4738 | 4739 |
| |
4739 |
| - | |
4740 |
| - | |
4741 |
| - | |
4742 |
| - | |
4743 |
| - | |
| 4740 | + | |
| 4741 | + | |
| 4742 | + | |
| 4743 | + | |
4744 | 4744 |
| |
4745 | 4745 |
| |
4746 | 4746 |
| |
4747 |
| - | |
4748 |
| - | |
4749 |
| - | |
4750 |
| - | |
4751 |
| - | |
4752 |
| - | |
4753 |
| - | |
4754 |
| - | |
4755 |
| - | |
4756 |
| - | |
4757 |
| - | |
4758 |
| - | |
4759 |
| - | |
| 4747 | + | |
| 4748 | + | |
| 4749 | + | |
4760 | 4750 |
| |
4761 |
| - | |
4762 |
| - | |
4763 |
| - | |
4764 |
| - | |
4765 |
| - | |
4766 |
| - | |
| 4751 | + | |
| 4752 | + | |
4767 | 4753 |
| |
4768 | 4754 |
| |
4769 | 4755 |
| |
4770 | 4756 |
| |
4771 |
| - | |
4772 |
| - | |
| 4757 | + | |
4773 | 4758 |
| |
4774 |
| - | |
4775 |
| - | |
4776 |
| - | |
| 4759 | + | |
| 4760 | + | |
| 4761 | + | |
| 4762 | + | |
| 4763 | + | |
| 4764 | + | |
| 4765 | + | |
| 4766 | + | |
| 4767 | + | |
| 4768 | + | |
| 4769 | + | |
| 4770 | + | |
| 4771 | + | |
4777 | 4772 |
| |
4778 | 4773 |
| |
4779 | 4774 |
| |
|
Lines changed: 34 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4111 | 4111 |
| |
4112 | 4112 |
| |
4113 | 4113 |
| |
4114 |
| - | |
| 4114 | + | |
| 4115 | + | |
| 4116 | + | |
| 4117 | + | |
| 4118 | + | |
4115 | 4119 |
| |
4116 |
| - | |
| 4120 | + | |
| 4121 | + | |
| 4122 | + | |
| 4123 | + | |
| 4124 | + | |
| 4125 | + | |
| 4126 | + | |
| 4127 | + | |
| 4128 | + | |
| 4129 | + | |
| 4130 | + | |
| 4131 | + | |
| 4132 | + | |
| 4133 | + | |
| 4134 | + | |
| 4135 | + | |
| 4136 | + | |
| 4137 | + | |
| 4138 | + | |
| 4139 | + | |
| 4140 | + | |
| 4141 | + | |
| 4142 | + | |
| 4143 | + | |
| 4144 | + | |
| 4145 | + | |
| 4146 | + | |
| 4147 | + | |
| 4148 | + | |
4117 | 4149 |
| |
4118 | 4150 |
| |
4119 | 4151 |
| |
|
Lines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1056 | 1056 |
| |
1057 | 1057 |
| |
1058 | 1058 |
| |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
1059 | 1064 |
| |
1060 | 1065 |
| |
1061 | 1066 |
| |
|
0 commit comments
Comments
(0)