forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit0fbf011
committed
Check column list length in XMLTABLE/JSON_TABLE alias
We weren't checking the length of the column list in the alias clause ofan XMLTABLE or JSON_TABLE function (a "tablefunc" RTE), and it waspossible to make the server crash by passing an overly long one. Fix itby throwing an error in that case, like the other places that deal withalias lists.In passing, modify the equivalent test used for join RTEs to look likethe other ones, which was different for no apparent reason.This bug came in when XMLTABLE was born in version 10; backpatch to allstable versions.Reported-by: Wang Ke <krking@zju.edu.cn>Discussion:https://postgr.es/m/17480-1c9d73565bb28e90@postgresql.org1 parent598ac10 commit0fbf011
File tree
12 files changed
+49
-17
lines changed- src
- backend/parser
- test/regress
- expected
- sql
12 files changed
+49
-17
lines changedLines changed: 0 additions & 15 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1444 | 1444 |
| |
1445 | 1445 |
| |
1446 | 1446 |
| |
1447 |
| - | |
1448 |
| - | |
1449 |
| - | |
1450 |
| - | |
1451 |
| - | |
1452 |
| - | |
1453 |
| - | |
1454 |
| - | |
1455 |
| - | |
1456 |
| - | |
1457 |
| - | |
1458 |
| - | |
1459 |
| - | |
1460 |
| - | |
1461 |
| - | |
1462 | 1447 |
| |
1463 | 1448 |
| |
1464 | 1449 |
| |
|
Lines changed: 17 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1989 | 1989 |
| |
1990 | 1990 |
| |
1991 | 1991 |
| |
1992 |
| - | |
1993 |
| - | |
| 1992 | + | |
1994 | 1993 |
| |
1995 | 1994 |
| |
1996 | 1995 |
| |
| 1996 | + | |
| 1997 | + | |
| 1998 | + | |
1997 | 1999 |
| |
1998 | 2000 |
| |
1999 | 2001 |
| |
| |||
2013 | 2015 |
| |
2014 | 2016 |
| |
2015 | 2017 |
| |
| 2018 | + | |
| 2019 | + | |
| 2020 | + | |
| 2021 | + | |
| 2022 | + | |
| 2023 | + | |
| 2024 | + | |
2016 | 2025 |
| |
2017 | 2026 |
| |
2018 | 2027 |
| |
| |||
2192 | 2201 |
| |
2193 | 2202 |
| |
2194 | 2203 |
| |
| 2204 | + | |
| 2205 | + | |
| 2206 | + | |
| 2207 | + | |
| 2208 | + | |
| 2209 | + | |
2195 | 2210 |
| |
2196 | 2211 |
| |
2197 | 2212 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
45 | 45 |
| |
46 | 46 |
| |
47 | 47 |
| |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
48 | 52 |
| |
49 | 53 |
| |
50 | 54 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5872 | 5872 |
| |
5873 | 5873 |
| |
5874 | 5874 |
| |
| 5875 | + | |
| 5876 | + | |
| 5877 | + | |
5875 | 5878 |
| |
5876 | 5879 |
| |
5877 | 5880 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1031 | 1031 |
| |
1032 | 1032 |
| |
1033 | 1033 |
| |
| 1034 | + | |
| 1035 | + | |
1034 | 1036 |
| |
1035 | 1037 |
| |
1036 | 1038 |
| |
|
Lines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1794 | 1794 |
| |
1795 | 1795 |
| |
1796 | 1796 |
| |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
1797 | 1802 |
| |
1798 | 1803 |
| |
1799 | 1804 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1145 | 1145 |
| |
1146 | 1146 |
| |
1147 | 1147 |
| |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
1148 | 1151 |
| |
1149 | 1152 |
| |
1150 | 1153 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
17 | 17 |
| |
18 | 18 |
| |
19 | 19 |
| |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
20 | 24 |
| |
21 | 25 |
| |
22 | 26 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1985 | 1985 |
| |
1986 | 1986 |
| |
1987 | 1987 |
| |
| 1988 | + | |
| 1989 | + | |
| 1990 | + | |
1988 | 1991 |
| |
1989 | 1992 |
| |
1990 | 1993 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
328 | 328 |
| |
329 | 329 |
| |
330 | 330 |
| |
| 331 | + | |
| 332 | + | |
331 | 333 |
| |
332 | 334 |
| |
333 | 335 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
803 | 803 |
| |
804 | 804 |
| |
805 | 805 |
| |
| 806 | + | |
| 807 | + | |
| 808 | + | |
806 | 809 |
| |
807 | 810 |
| |
808 | 811 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
384 | 384 |
| |
385 | 385 |
| |
386 | 386 |
| |
| 387 | + | |
| 388 | + | |
| 389 | + | |
387 | 390 |
| |
388 | 391 |
| |
389 | 392 |
| |
|
0 commit comments
Comments
(0)