forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit9d51733
committed
Tighten array dimensionality checks in Python -> SQL array conversion.
Like plperl beforef47004a, plpython wasn't being sufficientlycareful about checking that list-of-list structures representrectangular arrays, so that it would accept some cases in whichdifferent parts of the "array" are nested to different depths.This was exacerbated by Python's weak distinction betweensequences and lists, so that in some cases strings could gettreated as though they are lists (and burst into individualcharacters) even though a different ordering of the upper-levellist would give a different result.Some of this behavior was unreachable (without risking a crash)before81eaaf6. It seems like a good idea to clean it all upin the same releases, rather than shipping a non-crashing butnonetheless visibly buggy behavior in the name of minimal change.Hence, back-patch.Per bug #17912 and further testing by Alexander Lakhin.Discussion:https://postgr.es/m/17912-82ceed78731d9cdc@postgresql.org1 parent66ab266 commit9d51733
File tree
4 files changed
+270
-128
lines changed- src/pl/plpython
- expected
- sql
4 files changed
+270
-128
lines changedLines changed: 58 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
687 | 687 |
| |
688 | 688 |
| |
689 | 689 |
| |
690 |
| - | |
691 |
| - | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
692 | 693 |
| |
693 |
| - | |
694 |
| - | |
| 694 | + | |
| 695 | + | |
695 | 696 |
| |
696 |
| - | |
| 697 | + | |
697 | 698 |
| |
698 | 699 |
| |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
699 | 737 |
| |
700 | 738 |
| |
701 | 739 |
| |
702 | 740 |
| |
703 |
| - | |
704 |
| - | |
| 741 | + | |
705 | 742 |
| |
706 | 743 |
| |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
707 | 758 |
| |
708 | 759 |
| |
709 | 760 |
| |
|
Lines changed: 58 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
687 | 687 |
| |
688 | 688 |
| |
689 | 689 |
| |
690 |
| - | |
691 |
| - | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
692 | 693 |
| |
693 |
| - | |
694 |
| - | |
| 694 | + | |
| 695 | + | |
695 | 696 |
| |
696 |
| - | |
| 697 | + | |
697 | 698 |
| |
698 | 699 |
| |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
699 | 737 |
| |
700 | 738 |
| |
701 | 739 |
| |
702 | 740 |
| |
703 |
| - | |
704 |
| - | |
| 741 | + | |
705 | 742 |
| |
706 | 743 |
| |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
707 | 758 |
| |
708 | 759 |
| |
709 | 760 |
| |
|
0 commit comments
Comments
(0)