- Notifications
You must be signed in to change notification settings - Fork28
Commitb35cce9
committed
Fix unsafe reference into relcache in constructed CommentStmt.
The CommentStmt made by RebuildConstraintComment() has to pstrdup therelation name, else it will contain a dangling pointer after thatrelcache entry is flushed. (I'm less sure that pstrdup'ing connameis necessary, but let's be safe.) Failure to do this leads to weirderrors or crashes, as reported by Marko Elezovic.Bug introduced by commite42375f, so back-patch to 9.5 as that was.Fix by David Rowley, regression test by Michael PaquierDiscussion:https://postgr.es/m/DB6PR03MB30775D58E732D4EB0C13725B9AE00@DB6PR03MB3077.eurprd03.prod.outlook.com1 parentc4118d3 commitb35cce9
File tree
3 files changed
+53
-2
lines changed- src
- backend/commands
- test/regress
- expected
- sql
3 files changed
+53
-2
lines changedLines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8917 | 8917 |
| |
8918 | 8918 |
| |
8919 | 8919 |
| |
8920 |
| - | |
8921 |
| - | |
| 8920 | + | |
| 8921 | + | |
8922 | 8922 |
| |
8923 | 8923 |
| |
8924 | 8924 |
| |
|
Lines changed: 33 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2788 | 2788 |
| |
2789 | 2789 |
| |
2790 | 2790 |
| |
| 2791 | + | |
| 2792 | + | |
| 2793 | + | |
| 2794 | + | |
| 2795 | + | |
| 2796 | + | |
| 2797 | + | |
| 2798 | + | |
| 2799 | + | |
| 2800 | + | |
| 2801 | + | |
| 2802 | + | |
| 2803 | + | |
| 2804 | + | |
| 2805 | + | |
| 2806 | + | |
| 2807 | + | |
| 2808 | + | |
| 2809 | + | |
| 2810 | + | |
| 2811 | + | |
| 2812 | + | |
| 2813 | + | |
| 2814 | + | |
| 2815 | + | |
| 2816 | + | |
| 2817 | + | |
| 2818 | + | |
| 2819 | + | |
| 2820 | + | |
| 2821 | + | |
| 2822 | + | |
| 2823 | + | |
2791 | 2824 |
| |
2792 | 2825 |
| |
2793 | 2826 |
| |
|
Lines changed: 18 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1786 | 1786 |
| |
1787 | 1787 |
| |
1788 | 1788 |
| |
| 1789 | + | |
| 1790 | + | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
1789 | 1807 |
| |
1790 | 1808 |
| |
1791 | 1809 |
| |
|
0 commit comments
Comments
(0)