Add to_bin() and to_oct().
Nathan Bossart <nathan@postgresql.org>
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
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/func.sgml | modified | +58 −1 |
| src/backend/utils/adt/varlena.c | modified | +60 −26 |
| src/include/catalog/pg_proc.dat | modified | +12 −0 |
| src/test/regress/expected/strings.out | modified | +61 −1 |
| src/test/regress/sql/strings.sql | modified | +13 −2 |
Documentation touched
Discussion
- [PATCH] Add function to_oct 34 messages · 2022-12-20 → 2023-08-23