diff options
author | Richard Guo <rguo@postgresql.org> | 2025-05-15 17:09:04 +0900 |
---|---|---|
committer | Richard Guo <rguo@postgresql.org> | 2025-05-15 17:26:13 +0900 |
commit | 666103090f1d18e26388aef1ee5840d86cb8604b (patch) | |
tree | 2983b3d9c0f04ac079d003bdceabd8b9c0f73fad /src/tutorial | |
parent | 7f1da18d679e125eb454ce31fdd2b69d4da32d68 (diff) |
Fix Assert failure in XMLTABLE parser
In an XMLTABLE expression, columns can be marked NOT NULL, and the
parser internally fabricates an option named "is_not_null" to
represent this. However, the parser also allows users to specify
arbitrary option names. This creates a conflict: a user can
explicitly use "is_not_null" as an option name and assign it a
non-Boolean value, which violates internal assumptions and triggers an
assertion failure.
To fix, this patch checks whether a user-supplied name collides with
the internally reserved option name and raises an error if so.
Additionally, the internal name is renamed to "__pg__is_not_null" to
further 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.ru
Backpatch-through: 15
Diffstat (limited to 'src/tutorial')
0 files changed, 0 insertions, 0 deletions