Reject trailing junk after numeric literals
Peter Eisentraut <peter@eisentraut.org>
Reject trailing junk after numeric literals After this, the PostgreSQL lexers no longer accept numeric literals with trailing non-digits, such as 123abc, which would be scanned as two tokens: 123 and abc. This is undocumented and surprising, and it might also interfere with some extended numeric literal syntax being contemplated for the future. Reviewed-by: John Naylor <john.naylor@enterprisedb.com> Discussion: https://www.postgresql.org/message-id/flat/b239564c-cad0-b23e-c57e-166d883cb97d@enterprisedb.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/parser/scan.l | modified | +23 −14 |
| src/fe_utils/psqlscan.l | modified | +18 −13 |
| src/interfaces/ecpg/preproc/pgc.l | modified | +26 −10 |
| src/test/regress/expected/numerology.out | modified | +29 −48 |
| src/test/regress/sql/numerology.sql | modified | +0 −1 |
Discussion
- Non-decimal integer literals 59 messages · 2021-08-16 → 2023-01-23