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 INT64_HEX_FORMAT and UINT64_HEX_FORMAT to c.h.
Date: Fri, 22 Nov 2024 18:42:17 +0000
Message-ID: <E1tEYbh-00341d-VG@gemulon.postgresql.org> (raw)

Add INT64_HEX_FORMAT and UINT64_HEX_FORMAT to c.h.

Like INT64_FORMAT and UINT64_FORMAT, these macros produce format
strings for 64-bit integers.  However, INT64_HEX_FORMAT and
UINT64_HEX_FORMAT generate the output in hexadecimal instead of
decimal.  Besides introducing these macros, this commit makes use
of them in several places.  This was originally intended to be part
of commit 5d6187d2a2, but I left it out because I felt there was a
nonzero chance that back-patching these new macros into c.h could
cause problems with third-party code.  We tend to be less cautious
with such changes in new major versions.

Note that UINT64_HEX_FORMAT was originally added in commit
ee1b30f128, but it was placed in test_radixtree.c, so it wasn't
widely available.  This commit moves UINT64_HEX_FORMAT to c.h.

Discussion: https://postgr.es/m/ZwQvtUbPKaaRQezd%40nathan

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/efdc7d747539fccc7c9a946bfcb4ded716f679f1

Modified Files
--------------
contrib/postgres_fdw/option.c                    | 2 +-
src/backend/utils/error/csvlog.c                 | 2 +-
src/backend/utils/error/elog.c                   | 4 ++--
src/backend/utils/error/jsonlog.c                | 2 +-
src/include/c.h                                  | 2 ++
src/test/modules/test_radixtree/test_radixtree.c | 2 --
6 files changed, 7 insertions(+), 7 deletions(-)



Message-ID: <E1tEYbh-00341d-VG@gemulon.postgresql.org>
Permalink:  ../E1tEYbh-00341d-VG@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1tEYbh-00341d-VG@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 INT64_HEX_FORMAT and UINT64_HEX_FORMAT to c.h.
  In-Reply-To: <E1tEYbh-00341d-VG@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