Waiting for PostgreSQL 16 – Allow underscores in integer and numeric constants.

On 4th of February 2023, Dean Rasheed committed patch:

Allow underscores in integer and numeric constants.
 
This allows underscores to be used in integer and numeric literals,
and their corresponding type input functions, for visual grouping.
For example:
 
    1_500_000_000
    3.14159_26535_89793
    0xffff_ffff
    0b_1001_0001
 
A single underscore is allowed between any 2 digits, or immediately
after the base prefix indicator of non-decimal integers, per SQL:202x
draft.
 
Peter Eisentraut and Dean Rasheed
 
Discussion: https://postgr.es/m/84aae844-dc55-a4be-86d9-4f0fa405cc97%40enterprisedb.com

Continue reading Waiting for PostgreSQL 16 – Allow underscores in integer and numeric constants.

Waiting for PostgreSQL 16 – Non-decimal integer literals

On 14th of December 2022, Peter Eisentraut committed patch:

Non-decimal integer literals 
 
Add support for hexadecimal, octal, and binary integer literals:
 
    0x42F
    0o273
    0b100101
 
per SQL:202x draft.
 
This adds support in the lexer as well as in the integer type input
functions.
 
Reviewed-by: John Naylor <john.naylor@enterprisedb.com>
Reviewed-by: Zhihong Yu <zyu@yugabyte.com>
Reviewed-by: David Rowley <dgrowleyml@gmail.com>
Reviewed-by: Dean Rasheed <dean.a.rasheed@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/b239564c-cad0-b23e-c57e-166d883cb97d@enterprisedb.com

Continue reading Waiting for PostgreSQL 16 – Non-decimal integer literals

Changes on explain.depesz.com

Just pushed some new changes to expain.depesz.com and it's underlying parsing library.

The changes are:

  • If you upload plan in JSON/YAML/XML format, and then you'll look at “TEXT" tab, you will see explain in text format, generated using data from JSON. This explain had slight error in number formatting (3 decimal digits for estimated costs, while text formats use only 2 decimals). THis was reported by ysch on irc. Example plan
  • Numbers in node details (for example: Filtered, or Buffers info) are now commified to make it easier to read. Example plan
  • Fixed parsing of Planning time in JSON, YAML, and XML formats of explains from PostgreSQL 13. Example plans:
    JSON, YAML, and XML.

Some stats, for curious ones:

  • site is up for over 11 years and 6 months
  • so far there have been 843,215 plans added
  • within last 30 days, there have been 484 new plans added daily, on average
  • there are 1295 registered users, but only 780 of them ever added any plans