pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathan@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add to_bin() and to_oct().
Date: Wed, 23 Aug 2023 14:50:46 +0000
Message-ID: <E1qYpC1-000Uk7-KZ@gemulon.postgresql.org> (raw)

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/260a1f18dae8729f99cefe4e1f759193fd6bedd0

Modified Files
--------------
doc/src/sgml/func.sgml                | 59 +++++++++++++++++++++++-
src/backend/utils/adt/varlena.c       | 86 ++++++++++++++++++++++++-----------
src/include/catalog/pg_proc.dat       | 12 +++++
src/test/regress/expected/strings.out | 62 ++++++++++++++++++++++++-
src/test/regress/sql/strings.sql      | 15 +++++-
5 files changed, 204 insertions(+), 30 deletions(-)



view thread (2+ messages)  latest in thread

Message-ID: <E1qYpC1-000Uk7-KZ@gemulon.postgresql.org>
Permalink:  ../E1qYpC1-000Uk7-KZ@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1qYpC1-000Uk7-KZ@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: nathan@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Add to_bin() and to_oct().
  In-Reply-To: <E1qYpC1-000Uk7-KZ@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox