forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit38bef9e
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 parentdef510c commit38bef9e
File tree
4 files changed
+85
-50
lines changed- doc/src/sgml
- src
- backend/utils/adt
- test/regress
- expected
- sql
4 files changed
+85
-50
lines changedLines changed: 7 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
11925 | 11925 |
| |
11926 | 11926 |
| |
11927 | 11927 |
| |
11928 |
| - | |
11929 |
| - | |
11930 |
| - | |
11931 |
| - | |
| 11928 | + | |
| 11929 | + | |
| 11930 | + | |
| 11931 | + | |
| 11932 | + | |
| 11933 | + | |
| 11934 | + | |
11932 | 11935 |
| |
11933 | 11936 |
| |
11934 | 11937 |
| |
|
Lines changed: 39 additions & 44 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4583 | 4583 |
| |
4584 | 4584 |
| |
4585 | 4585 |
| |
4586 |
| - | |
4587 |
| - | |
| 4586 | + | |
| 4587 | + | |
4588 | 4588 |
| |
4589 | 4589 |
| |
4590 |
| - | |
| 4590 | + | |
| 4591 | + | |
4591 | 4592 |
| |
4592 | 4593 |
| |
4593 | 4594 |
| |
4594 | 4595 |
| |
4595 |
| - | |
| 4596 | + | |
| 4597 | + | |
| 4598 | + | |
4596 | 4599 |
| |
4597 | 4600 |
| |
4598 |
| - | |
| 4601 | + | |
4599 | 4602 |
| |
4600 | 4603 |
| |
4601 | 4604 |
| |
4602 | 4605 |
| |
4603 |
| - | |
4604 |
| - | |
| 4606 | + | |
| 4607 | + | |
| 4608 | + | |
4605 | 4609 |
| |
4606 | 4610 |
| |
4607 | 4611 |
| |
4608 | 4612 |
| |
4609 |
| - | |
4610 |
| - | |
4611 |
| - | |
4612 |
| - | |
4613 | 4613 |
| |
4614 | 4614 |
| |
4615 |
| - | |
| 4615 | + | |
| 4616 | + | |
| 4617 | + | |
| 4618 | + | |
4616 | 4619 |
| |
4617 | 4620 |
| |
4618 | 4621 |
| |
| |||
4628 | 4631 |
| |
4629 | 4632 |
| |
4630 | 4633 |
| |
4631 |
| - | |
4632 |
| - | |
4633 |
| - | |
| 4634 | + | |
4634 | 4635 |
| |
4635 |
| - | |
4636 |
| - | |
4637 |
| - | |
4638 |
| - | |
4639 |
| - | |
| 4636 | + | |
| 4637 | + | |
| 4638 | + | |
| 4639 | + | |
4640 | 4640 |
| |
4641 | 4641 |
| |
4642 | 4642 |
| |
4643 |
| - | |
4644 |
| - | |
4645 |
| - | |
4646 |
| - | |
4647 |
| - | |
4648 |
| - | |
4649 |
| - | |
4650 |
| - | |
4651 |
| - | |
4652 |
| - | |
4653 |
| - | |
4654 |
| - | |
4655 |
| - | |
| 4643 | + | |
| 4644 | + | |
| 4645 | + | |
4656 | 4646 |
| |
4657 |
| - | |
4658 |
| - | |
4659 |
| - | |
4660 |
| - | |
4661 |
| - | |
4662 |
| - | |
| 4647 | + | |
| 4648 | + | |
4663 | 4649 |
| |
4664 | 4650 |
| |
4665 | 4651 |
| |
4666 | 4652 |
| |
4667 |
| - | |
4668 |
| - | |
| 4653 | + | |
4669 | 4654 |
| |
4670 |
| - | |
4671 |
| - | |
4672 |
| - | |
| 4655 | + | |
| 4656 | + | |
| 4657 | + | |
| 4658 | + | |
| 4659 | + | |
| 4660 | + | |
| 4661 | + | |
| 4662 | + | |
| 4663 | + | |
| 4664 | + | |
| 4665 | + | |
| 4666 | + | |
| 4667 | + | |
4673 | 4668 |
| |
4674 | 4669 |
| |
4675 | 4670 |
| |
|
Lines changed: 34 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4107 | 4107 |
| |
4108 | 4108 |
| |
4109 | 4109 |
| |
4110 |
| - | |
| 4110 | + | |
| 4111 | + | |
| 4112 | + | |
| 4113 | + | |
| 4114 | + | |
4111 | 4115 |
| |
4112 |
| - | |
| 4116 | + | |
| 4117 | + | |
| 4118 | + | |
| 4119 | + | |
| 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 | + | |
4113 | 4145 |
| |
4114 | 4146 |
| |
4115 | 4147 |
| |
|
Lines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1052 | 1052 |
| |
1053 | 1053 |
| |
1054 | 1054 |
| |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
1055 | 1060 |
| |
1056 | 1061 |
| |
1057 | 1062 |
| |
|
0 commit comments
Comments
(0)