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

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 parentc563919 commit2f48b4f
5 files changed
+25
-4
lines changedLines changed: 11 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
14048 | 14048 |
| |
14049 | 14049 |
| |
14050 | 14050 |
| |
14051 |
| - | |
| 14051 | + | |
14052 | 14052 |
| |
14053 | 14053 |
| |
14054 | 14054 |
| |
| |||
14091 | 14091 |
| |
14092 | 14092 |
| |
14093 | 14093 |
| |
14094 |
| - | |
| 14094 | + | |
| 14095 | + | |
| 14096 | + | |
| 14097 | + | |
| 14098 | + | |
| 14099 | + | |
| 14100 | + | |
| 14101 | + | |
14095 | 14102 |
| |
14096 | 14103 |
| |
14097 | 14104 |
| |
14098 |
| - | |
| 14105 | + | |
14099 | 14106 |
| |
14100 |
| - | |
| 14107 | + | |
14101 | 14108 |
| |
14102 | 14109 |
| |
14103 | 14110 |
| |
|
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)