mirror of
https://github.com/postgres/postgres.git
synced 2025-07-07 00:36:50 +03:00
Fix PL/pgSQL's handling of integer ranges containing underscores.
Commit faff8f8e47
allowed integer literals to contain underscores, but
failed to update the lexer's "numericfail" rule. As a result, a
decimal integer literal containing underscores would fail to parse, if
used in an integer range with no whitespace after the first number,
such as "1_001..1_003" in a PL/pgSQL FOR loop.
Fix and backpatch to v16, where support for underscores in integer
literals was added.
Report and patch by Erik Wienhold.
Discussion: https://postgr.es/m/808ce947-46ec-4628-85fa-3dd600b2c154%40ewie.name
This commit is contained in:
@ -407,7 +407,7 @@ octfail 0[oO]_?
|
||||
binfail 0[bB]_?
|
||||
|
||||
numeric (({decinteger}\.{decinteger}?)|(\.{decinteger}))
|
||||
numericfail {decdigit}+\.\.
|
||||
numericfail {decinteger}\.\.
|
||||
|
||||
real ({decinteger}|{numeric})[Ee][-+]?{decinteger}
|
||||
realfail ({decinteger}|{numeric})[Ee][-+]
|
||||
|
Reference in New Issue
Block a user