Re: Non-decimal integer literals
От | John Naylor |
---|---|
Тема | Re: Non-decimal integer literals |
Дата | |
Msg-id | CAFBsxsHZZ4e7CaFQoAY=GZiUDcXpjEOXq5R86mok5S_wYyvbbQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Non-decimal integer literals (Peter Eisentraut <peter.eisentraut@enterprisedb.com>) |
Ответы |
Re: Non-decimal integer literals
|
Список | pgsql-hackers |
On Mon, Aug 16, 2021 at 5:52 AM Peter Eisentraut <peter.eisentraut@enterprisedb.com> wrote:
>
> Here is a patch to add support for hexadecimal, octal, and binary
> integer literals:
>
> 0x42E
> 0o112
> 0b100101
>
> per SQL:202x draft.
>
> This adds support in the lexer as well as in the integer type input
> functions.
The one thing that jumped out at me on a cursory reading is the {integer} rule, which seems to be used nowhere except to call process_integer_literal, which must then inspect the token text to figure out what type of integer it is. Maybe consider 4 separate process_*_literal functions?
--
John Naylor
EDB: http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления: