mirror of
https://git.postgresql.org/git/postgresql.git
synced 2026-02-13 18:07:05 +08: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:
@ -343,7 +343,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