diff options
| author | Heikki Linnakangas | 2025-05-19 15:50:26 +0000 |
|---|---|---|
| committer | Heikki Linnakangas | 2025-05-19 15:50:47 +0000 |
| commit | 54c05292b1ffc8d7ad9305d224225161e4d3d412 (patch) | |
| tree | 2daf774639129bd19a641b9840f499dfd45ff63b /doc/src/sgml/ref/pg_resetwal.sgml | |
| parent | 7318f241d29c0b90e0b8b7e39ebd1914f68fd37a (diff) | |
Fix deparsing FETCH FIRST <expr> ROWS WITH TIES
In the grammar, <expr> is a c_expr, which accepts only a limited set
of integer literals and simple expressions without parens. The
deparsing logic didn't quite match the grammar rule, and failed to use
parens e.g. for "5::bigint".
To fix, always surround the expression with parens. Would be nice to
omit the parens in simple cases, but unfortunately it's non-trivial to
detect such simple cases. Even if the expression is a simple literal
123 in the original query, after parse analysis it becomes a FuncExpr
with COERCE_IMPLICIT_CAST rather than a simple Const.
Reported-by: yonghao lee
Backpatch-through: 13
Discussion: https://www.postgresql.org/message-id/[email protected]
Diffstat (limited to 'doc/src/sgml/ref/pg_resetwal.sgml')
0 files changed, 0 insertions, 0 deletions
