diff options
author | Dean Rasheed | 2024-06-04 10:48:01 +0000 |
---|---|---|
committer | Dean Rasheed | 2024-06-04 10:48:01 +0000 |
commit | cd2624fd97b0c36b68da278abc5362647f69b07d (patch) | |
tree | 546ce885e69cf71857f561fcb6a3199a28eecb4e /src/fe_utils | |
parent | 5c5bccef211cfc98e0d6c4bc1af40a33c8ac2488 (diff) |
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
Diffstat (limited to 'src/fe_utils')
-rw-r--r-- | src/fe_utils/psqlscan.l | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fe_utils/psqlscan.l b/src/fe_utils/psqlscan.l index c6d02439ab2..ddc4658b925 100644 --- a/src/fe_utils/psqlscan.l +++ b/src/fe_utils/psqlscan.l @@ -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][-+] |