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 casting to same type
Date: Tue, 02 Dec 2025 09:24:21 +0000
Message-ID: <E1vQMcP-002PMH-1X@gemulon.postgresql.org> (raw )
Remove useless casting to same type
This removes some casts where the input already has the same type as
the type specified by the cast. Their presence could cause risks of
hiding actual type mismatches in the future or silently discarding
qualifiers. It also improves readability. Same kind of idea as
7f798aca1d5 and ef8fe693606. (This does not change all such
instances, but only those hand-picked by the author.)
Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Reviewed-by: Nathan Bossart <nathandbossart@gmail.com>
Reviewed-by: Jacob Champion <jacob.champion@enterprisedb.com>
Reviewed-by: Peter Eisentraut <peter@eisentraut.org>
Discussion: https://www.postgresql.org/message-id/flat/aSQy2JawavlVlEB0%40ip-10-97-1-34.eu-west-3.compute.intern...
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/4f941d432b42eccd99ba0d22e3a59c073ac2406a
Modified Files
--------------
contrib/btree_gist/btree_utils_num.c | 4 ++--
contrib/cube/cube.c | 6 +++---
contrib/fuzzystrmatch/dmetaphone.c | 2 +-
contrib/pgcrypto/mbuf.c | 2 +-
src/backend/access/common/indextuple.c | 2 +-
src/backend/access/gin/gindatapage.c | 8 ++++----
src/backend/access/gin/gininsert.c | 2 +-
src/backend/access/hash/hash_xlog.c | 4 ++--
src/backend/access/transam/twophase.c | 2 +-
src/backend/catalog/aclchk.c | 4 ++--
src/backend/commands/tablecmds.c | 2 +-
src/backend/executor/execExpr.c | 2 +-
src/backend/executor/execExprInterp.c | 2 +-
src/backend/executor/execPartition.c | 2 +-
src/backend/executor/nodeTableFuncscan.c | 2 +-
src/backend/optimizer/geqo/geqo_pool.c | 4 ++--
src/backend/optimizer/plan/planner.c | 4 ++--
src/backend/optimizer/util/pathnode.c | 2 +-
src/backend/parser/analyze.c | 2 +-
src/backend/parser/parse_expr.c | 4 ++--
src/backend/port/sysv_shmem.c | 2 +-
src/backend/replication/walsender.c | 2 +-
src/backend/rewrite/rewriteHandler.c | 2 +-
src/backend/statistics/dependencies.c | 4 ++--
src/backend/statistics/extended_stats.c | 4 ++--
src/backend/statistics/mcv.c | 2 +-
src/backend/storage/aio/aio.c | 6 +++---
src/backend/storage/aio/method_io_uring.c | 2 +-
src/backend/storage/ipc/waiteventset.c | 2 +-
src/backend/storage/lmgr/predicate.c | 2 +-
src/backend/storage/lmgr/proc.c | 8 ++++----
src/backend/utils/adt/arrayfuncs.c | 4 ++--
src/backend/utils/adt/jsonfuncs.c | 6 ++----
src/backend/utils/adt/ruleutils.c | 2 +-
src/bin/pg_dump/pg_dump.c | 8 ++++----
src/common/sha1.c | 4 ++--
src/interfaces/ecpg/ecpglib/descriptor.c | 2 +-
src/interfaces/ecpg/ecpglib/execute.c | 18 ++++++++----------
src/interfaces/ecpg/ecpglib/prepare.c | 6 +++---
src/port/win32ntdll.c | 2 +-
src/test/modules/test_radixtree/test_radixtree.c | 2 +-
41 files changed, 74 insertions(+), 78 deletions(-)
Message-ID: <E1vQMcP-002PMH-1X@gemulon.postgresql.org>
Permalink: ../E1vQMcP-002PMH-1X@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1vQMcP-002PMH-1X@gemulon.postgresql.org
copy link · copy postgr.es
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 casting to same type
In-Reply-To: <E1vQMcP-002PMH-1X@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