Add to_bin() and to_oct().

Nathan Bossart <nathan@postgresql.org>

Commit: 260a1f18dae8729f99cefe4e1f759193fd6bedd0
Author: Nathan Bossart <nathan@postgresql.org>
Date: 2023-08-23T14:49:03Z
Releases: 17.0
Add to_bin() and to_oct().

This commit introduces functions for converting numbers to their
equivalent binary and octal representations.  Also, the base
conversion code for these functions and to_hex() has been moved to
a common helper function.

Co-authored-by: Eric Radman
Reviewed-by: Ian Barwick, Dag Lem, Vignesh C, Tom Lane, Peter Eisentraut, Kirk Wolak, Vik Fearing, John Naylor, Dean Rasheed
Discussion: https://postgr.es/m/Y6IyTQQ/TsD5wnsH%40vm3.eradman.com

Files

Documentation touched

Discussion