- Notifications
You must be signed in to change notification settings - Fork4.9k
Commitd3716d4

Richard Guo
Fix Assert failure in XMLTABLE parser
In an XMLTABLE expression, columns can be marked NOT NULL, and theparser internally fabricates an option named "is_not_null" torepresent this. However, the parser also allows users to specifyarbitrary option names. This creates a conflict: a user canexplicitly use "is_not_null" as an option name and assign it anon-Boolean value, which violates internal assumptions and triggers anassertion failure.To fix, this patch checks whether a user-supplied name collides withthe internally reserved option name and raises an error if so.Additionally, the internal name is renamed to "__pg__is_not_null" tofurther reduce the risk of collision with user-defined names.Reported-by: Евгений Горбанев <gorbanyoves@basealt.ru>Author: Richard Guo <guofenglinux@gmail.com>Reviewed-by: Alvaro Herrera <alvherre@kurilemu.de>Discussion:https://postgr.es/m/6bac9886-65bf-4cec-96bd-e304159f28db@basealt.ruBackpatch-through: 151 parent9c94d98 commitd3716d4
5 files changed
+25
-4
lines changedLines changed: 11 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
13838 | 13838 |
| |
13839 | 13839 |
| |
13840 | 13840 |
| |
13841 |
| - | |
| 13841 | + | |
13842 | 13842 |
| |
13843 | 13843 |
| |
13844 | 13844 |
| |
| |||
13881 | 13881 |
| |
13882 | 13882 |
| |
13883 | 13883 |
| |
13884 |
| - | |
| 13884 | + | |
| 13885 | + | |
| 13886 | + | |
| 13887 | + | |
| 13888 | + | |
| 13889 | + | |
| 13890 | + | |
| 13891 | + | |
13885 | 13892 |
| |
13886 | 13893 |
| |
13887 | 13894 |
| |
13888 |
| - | |
| 13895 | + | |
13889 | 13896 |
| |
13890 |
| - | |
| 13897 | + | |
13891 | 13898 |
| |
13892 | 13899 |
| |
13893 | 13900 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1373 | 1373 |
| |
1374 | 1374 |
| |
1375 | 1375 |
| |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
1376 | 1380 |
| |
1377 | 1381 |
| |
1378 | 1382 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1047 | 1047 |
| |
1048 | 1048 |
| |
1049 | 1049 |
| |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
1050 | 1054 |
| |
1051 | 1055 |
| |
1052 | 1056 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1359 | 1359 |
| |
1360 | 1360 |
| |
1361 | 1361 |
| |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
1362 | 1366 |
| |
1363 | 1367 |
| |
1364 | 1368 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
435 | 435 |
| |
436 | 436 |
| |
437 | 437 |
| |
| 438 | + | |
| 439 | + | |
438 | 440 |
| |
439 | 441 |
| |
440 | 442 |
| |
|
0 commit comments
Comments
(0)