Underscores in numeric literals - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Underscores in numeric literals
Date
Msg-id 84aae844-dc55-a4be-86d9-4f0fa405cc97@enterprisedb.com
Whole thread Raw
Responses Re: Underscores in numeric literals
List pgsql-hackers
Here is a patch to add support for underscores in numeric literals, for 
visual grouping, like

     1_500_000_000
     0b10001000_00000000
     0o_1_755
     0xFFFF_FFFF
     1.618_034

per SQL:202x draft.

This adds support in the lexer as well as in the integer type input 
functions.

TODO: float/numeric type input support

I did some performance tests similar to what was done in [0] and didn't 
find any problematic deviations.  Other tests would be welcome.

[0]: 
https://www.postgresql.org/message-id/flat/b239564c-cad0-b23e-c57e-166d883cb97d@enterprisedb.com
Attachment

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Refactor recordExtObjInitPriv()
Next
From: Amit Kapila
Date:
Subject: Re: Exit walsender before confirming remote flush in logical replication