Re: Non-decimal integer literals

Поиск
Список
Период
Сортировка
От Vik Fearing
Тема Re: Non-decimal integer literals
Дата
Msg-id abb04ce4-a6b8-1c95-fa16-dc87e851e106@postgresfriends.org
обсуждение исходный текст
Ответ на Non-decimal integer literals  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Ответы Re: Non-decimal integer literals  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 8/16/21 11:51 AM, Peter Eisentraut wrote:
> Here is a patch to add support for hexadecimal, octal, and binary
> integer literals:
> 
>     0x42E
>     0o112
>     0b100101
> 
> per SQL:202x draft.

Is there any hope of adding the optional underscores?  I see a potential
problem there as SELECT 1_a; is currently parsed as SELECT 1 AS _a; when
it should be parsed as SELECT 1_ AS a; or perhaps even as an error since
0x1_a would be a valid number with no alias.

(The standard does not allow identifiers to begin with _ but we do...)
-- 
Vik Fearing



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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: Schema variables - new implementation for Postgres 15
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: Add jsonlog log_destination for JSON server logs