pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Dunstan <andrew@dunslane.net>
To: 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: Wed, 26 Jan 2022 11:19:15 -0500
Message-ID: <fc8e89a7-57b7-b495-320c-e91a194591ee@dunslane.net> (raw)
In-Reply-To: <202201251843.ajn72lsfpt36@alvherre.pgsql>
References: <202201251843.ajn72lsfpt36@alvherre.pgsql>


On 1/25/22 13:43, Alvaro Herrera wrote:
> 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.


+1. I can't remember the number of times I have miscounted a long string
of digits in a literal.


cheers


andrew


--
Andrew Dunstan
EDB: https://www.enterprisedb.com






view thread (62+ messages)  latest in thread

Message-ID: <fc8e89a7-57b7-b495-320c-e91a194591ee@dunslane.net>
Permalink:  ../fc8e89a7-57b7-b495-320c-e91a194591ee@dunslane.net/
Also on:    postgresql.org/message-id/fc8e89a7-57b7-b495-320c-e91a194591ee@dunslane.net

 · 

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: andrew@dunslane.net, alvherre@alvh.no-ip.org, peter.eisentraut@enterprisedb.com, john.naylor@enterprisedb.com
  Subject: Re: Non-decimal integer literals
  In-Reply-To: <fc8e89a7-57b7-b495-320c-e91a194591ee@dunslane.net>

* 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