Re: trailing junk in numeric literals

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: trailing junk in numeric literals
Дата
Msg-id 1850223.1609188899@sss.pgh.pa.us
обсуждение исходный текст
Ответ на trailing junk in numeric literals  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Ответы Re: trailing junk in numeric literals  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Список pgsql-hackers
Peter Eisentraut <peter.eisentraut@enterprisedb.com> writes:
> I was surprised to find that this doesn't error:
> => select 100a;
>    a
> -----
>   100

> I suspect this and similar cases used to error before aliases without AS 
> were introduced.  But now this seems possibly problematic.  Should we 
> try to handle this better?

Meh.  I think you'd get more brickbats than kudos if you start insisting
on a space there.

I'm too lazy to try to decipher the SQL spec right now, but ISTR that
it insists on whitespace between a numeric literal and an identifier.
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.

            regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: trailing junk in numeric literals
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: New IndexAM API controlling index vacuum strategies