Re: Non-decimal integer literals

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, John Naylor <john(dot)naylor(at)enterprisedb(dot)com>
Subject: Re: Non-decimal integer literals
Date: 2022-01-25 18:43:35
Message-ID: 202201251843.ajn72lsfpt36@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2022-Jan-24, Peter Eisentraut wrote:

> +decinteger {decdigit}(_?{decdigit})*
> +hexinteger 0[xX](_?{hexdigit})+
> +octinteger 0[oO](_?{octdigit})+
> +bininteger 0[bB](_?{bindigit})+

I think there should be test cases for literals that these seemingly
strange expressions reject, which are a number with trailing _ (0x123_),
and one with consecutive underscores __ (0x12__34).

I like the idea of these literals. I would have found them useful on
many occassions.

--
Álvaro Herrera Valdivia, Chile — https://www.EnterpriseDB.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2022-01-25 19:04:03 Re: CREATEROLE and role ownership hierarchies
Previous Message Robert Haas 2022-01-25 18:15:43 Re: Non-decimal integer literals