pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove useless casts in format arguments
Date: Tue, 09 Dec 2025 06:44:59 +0000
Message-ID: <E1vSrT0-003Zgd-2l@gemulon.postgresql.org> (raw)

Remove useless casts in format arguments

There were a number of useless casts in format arguments, either
where the input to the cast was already in the right type, or
seemingly uselessly casting between types instead of just using the
right format placeholder to begin with.

Reviewed-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/07fa29f9-42d7-4aac-8834-197918cbbab6%40eisentraut.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/2268f2b91b5513cbf430d1cca488203d66103b3a

Modified Files
--------------
contrib/amcheck/verify_heapam.c         | 72 ++++++++++++++++-----------------
src/backend/access/common/printtup.c    |  2 +-
src/backend/access/rmgrdesc/gindesc.c   |  2 +-
src/backend/access/transam/xact.c       |  6 +--
src/backend/access/transam/xlogreader.c | 26 ++++++------
src/backend/commands/copyfromparse.c    |  2 +-
src/backend/commands/define.c           |  2 +-
src/backend/libpq/auth.c                |  4 +-
src/backend/libpq/pqcomm.c              |  6 +--
src/backend/libpq/pqmq.c                |  2 +-
src/backend/parser/parse_type.c         |  2 +-
src/backend/replication/walreceiver.c   |  4 +-
src/backend/storage/page/bufpage.c      |  4 +-
src/backend/utils/adt/format_type.c     |  2 +-
src/backend/utils/adt/tsvector.c        |  6 +--
src/backend/utils/adt/xid.c             |  4 +-
src/bin/pg_ctl/pg_ctl.c                 | 25 ++++++------
src/bin/pgbench/pgbench.c               |  4 +-
src/bin/psql/common.c                   |  2 +-
19 files changed, 88 insertions(+), 89 deletions(-)



Message-ID: <E1vSrT0-003Zgd-2l@gemulon.postgresql.org>
Permalink:  ../E1vSrT0-003Zgd-2l@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1vSrT0-003Zgd-2l@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: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Remove useless casts in format arguments
  In-Reply-To: <E1vSrT0-003Zgd-2l@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