Hello Peter,
My 0.02€:
>> So strictly speaking this SQL code is nonstandard anyway. But our
>> lexer has always been forgiving about not requiring space if it's
>> not logically necessary to separate tokens. I doubt trying to
>> change that would improve matters.
>
> Well, the idea is to diagnose potential typos better. But if there is no
> interest, then that's fine.
ISTM that silently accepting bogus syntax hides bugs rather than helps
users. I'm personaly all for fixing these, especially when I'm said user.
My latest catch was:
SELECT TIMESTAMP '2020-12-29Z06:16:18'; # 2020-12-29 00:00:00
But:
SELECT TIMESTAMPTZ '2020-12-29Z06:16:18'; # 2020-12-29 07:16:18+01
SELECT TIMESTAMP '2020-12-29T06:16:18'; # 2020-12-29 06:16:18
I happen to type a O which is close to 0 for which the shift key is also
needed on the French keyboard. This makes the unhelpful:
SELECT 12O; # 12 as O
I think that the policy should be to help user by detecting mistyped
entries, not trying to interpret them out of the norm and expectations.
--
Fabien.