Format base - Code contribution - Mailing list pgsql-hackers

From Miles Elam
Subject Format base - Code contribution
Date
Msg-id CAPVvHdNDttbpV9nAq-CPx+Ai7mEmHcagAC=DJ405sQp=zr3+NQ@mail.gmail.com
Whole thread Raw
Responses Re: Format base - Code contribution
List pgsql-hackers
I would like to donate some code to the project, formatting numbers as any base from 2 to 64. The FAQ describes contributions to the core code, but it's possible contrib is a better target. This is all of course contingent on how well received this extension code is of course. Code available at the following link.

https://github.com/ttfkam/pg_formatbase

I believe it follows the PostgreSQL project's C code formatting guidelines and includes tests. Preliminary checks show it to be about as efficient as the built in hex formatting only it supports the full gamut of number formatting: binary, ternary, octal, hex, base 36 (popular with Javascript), etc. I was scratching a personal itch, but hopefully this can scratch others' as well.


Cheers,

Miles Elam
--
      Quidquid latine dictum sit, altum sonatur.      
    - Whatever is said in Latin sounds profound.

pgsql-hackers by date:

Previous
From: Andrew Gierth
Date:
Subject: Re: Toast issues with OldestXmin going backwards
Next
From: Amit Langote
Date:
Subject: Re: [HACKERS] path toward faster partition pruning