forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit43f4b34
committed
Fix reading of most-negative integer value nodes
The main parser checks whether a literal fits into an int whendeciding whether it should be put into an Integer or Float node. Theparser processes integer literals without signs. So a most-negativeinteger literal will not fit into Integer and will end up as a Floatnode.The node tokenizer did this differently. It included the sign whenchecking whether the literal fit into int. So a most-negative integerwould indeed fit that way and end up as an Integer node.In order to preserve the node structure correctly, we need the nodetokenizer to also analyze integer literals without sign.There are a number of test cases in the regression tests that have amost-negative integer argument of some utility statement, so thisissue is easily reproduced under WRITE_READ_PARSE_PLAN_TREES.Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>Discussion:https://www.postgresql.org/message-id/flat/4159834.1657405226@sss.pgh.pa.us1 parent03bf971 commit43f4b34
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
267 | 267 |
| |
268 | 268 |
| |
269 | 269 |
| |
270 |
| - | |
| 270 | + | |
271 | 271 |
| |
272 | 272 |
| |
273 | 273 |
| |
|
0 commit comments
Comments
(0)