pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Cc: John Naylor <john.naylor@enterprisedb.com>
Subject: Re: Non-decimal integer literals
Date: Tue, 25 Jan 2022 15:43:35 -0300
Message-ID: <202201251843.ajn72lsfpt36@alvherre.pgsql> (raw)
In-Reply-To: <c42cb38a-ac42-dd92-2935-dce3b9806e26@enterprisedb.com>

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/





view thread (62+ messages)  latest in thread

Message-ID: <202201251843.ajn72lsfpt36@alvherre.pgsql>
Permalink:  ../202201251843.ajn72lsfpt36@alvherre.pgsql/
Also on:    postgresql.org/message-id/202201251843.ajn72lsfpt36@alvherre.pgsql

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: alvherre@alvh.no-ip.org, peter.eisentraut@enterprisedb.com, john.naylor@enterprisedb.com
  Subject: Re: Non-decimal integer literals
  In-Reply-To: <202201251843.ajn72lsfpt36@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox