Prevent numeric literals from having non-numeric trailing characters (Peter Eisentraut)
Regarding the changes made in version 15 for the traitment of the non-numeric
trailing characters, why does parsing continue to be permissive with
parentheses (no need to add a space)? Are we still in standard SQL?
Regards
Fabrice
SELECT (123)order by 1;
+----------+
| ?column? |
+----------+
| 123 |
+----------+
(1 row)
postgres [2043238]=# SELECT (123)abc;
+-----+
| abc |
+-----+
| 123 |
+-----+
(1 row)
Fabrice Chapuis <fabrice636861@gmail.com> writes:
Regarding the changes made in version 15 for the traitment of the non-numeric
trailing characters, why does parsing continue to be permissive with
parentheses (no need to add a space)?
A parenthesis cannot be part of a larger token, so I don't see
any ambiguity that we'd need to resolve by requiring spaces.
regards, tom lane
On 20.06.25 15:29, Fabrice Chapuis wrote:
Regarding the changes made in version 15 for the traitment of the non-
numeric trailing characters, why does parsing continue to be permissive
with parentheses (no need to add a space)? Are we still in standard SQL?
Yes, a parenthesis is a "delimiter token", so there does not need to be
a separator between it and an adjacent token.