forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit33f4372
committed
Add three-parameter forms of array_to_string and string_to_array, to allow
better handling of NULL elements within the arrays. The third parameteris a string that should be used to represent a NULL element, or shouldbe translated into a NULL element, respectively. If the third parameteris NULL it behaves the same as the two-parameter form.There are two incompatible changes in the behavior of the two-parameter formof string_to_array. First, it will return an empty (zero-element) arrayrather than NULL when the input string is of zero length. Second, if thefield separator is NULL, the function splits the string into individualcharacters, rather than returning NULL as before. These two changes makethis form fully compatible with the behavior of the new three-parameter form.Pavel Stehule, reviewed by Brendan Jurd1 parent5148a04 commit33f4372
File tree
9 files changed
+381
-86
lines changed- doc/src/sgml
- src
- backend/utils/adt
- include
- catalog
- utils
- test/regress
- expected
- sql
9 files changed
+381
-86
lines changedLines changed: 39 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 |
| - | |
| 1 | + | |
2 | 2 |
| |
3 | 3 |
| |
4 | 4 |
| |
| |||
9736 | 9736 |
| |
9737 | 9737 |
| |
9738 | 9738 |
| |
9739 |
| - | |
| 9739 | + | |
9740 | 9740 |
| |
9741 | 9741 |
| |
9742 | 9742 |
| |
9743 |
| - | |
9744 |
| - | |
9745 |
| - | |
| 9743 | + | |
| 9744 | + | |
| 9745 | + | |
| 9746 | + | |
9746 | 9747 |
| |
9747 | 9748 |
| |
9748 | 9749 |
| |
| |||
9758 | 9759 |
| |
9759 | 9760 |
| |
9760 | 9761 |
| |
9761 |
| - | |
| 9762 | + | |
9762 | 9763 |
| |
9763 | 9764 |
| |
9764 | 9765 |
| |
9765 |
| - | |
9766 |
| - | |
9767 |
| - | |
| 9766 | + | |
| 9767 | + | |
| 9768 | + | |
| 9769 | + | |
9768 | 9770 |
| |
9769 | 9771 |
| |
9770 | 9772 |
| |
| |||
9781 | 9783 |
| |
9782 | 9784 |
| |
9783 | 9785 |
| |
| 9786 | + | |
| 9787 | + | |
| 9788 | + | |
| 9789 | + | |
| 9790 | + | |
| 9791 | + | |
| 9792 | + | |
| 9793 | + | |
| 9794 | + | |
| 9795 | + | |
| 9796 | + | |
| 9797 | + | |
| 9798 | + | |
| 9799 | + | |
| 9800 | + | |
| 9801 | + | |
| 9802 | + | |
| 9803 | + | |
| 9804 | + | |
| 9805 | + | |
| 9806 | + | |
| 9807 | + | |
| 9808 | + | |
| 9809 | + | |
| 9810 | + | |
| 9811 | + | |
| 9812 | + | |
| 9813 | + | |
9784 | 9814 |
| |
9785 | 9815 |
| |
9786 | 9816 |
| |
|
Lines changed: 5 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6 | 6 |
| |
7 | 7 |
| |
8 | 8 |
| |
9 |
| - | |
| 9 | + | |
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
| |||
407 | 407 |
| |
408 | 408 |
| |
409 | 409 |
| |
| 410 | + | |
410 | 411 |
| |
411 | 412 |
| |
412 | 413 |
| |
| 414 | + | |
413 | 415 |
| |
414 | 416 |
| |
415 | 417 |
| |
| |||
429 | 431 |
| |
430 | 432 |
| |
431 | 433 |
| |
| 434 | + | |
432 | 435 |
| |
433 | 436 |
| |
434 | 437 |
| |
| |||
462 | 465 |
| |
463 | 466 |
| |
464 | 467 |
| |
465 |
| - | |
| 468 | + | |
466 | 469 |
| |
467 | 470 |
| |
468 | 471 |
| |
|
0 commit comments
Comments
(0)