agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Sync signatures of gbt_var_consistent() and gbt_num_consistent()
Date: Fri, 03 Jul 2026 18:23:42 +0000
Message-ID: <E1wfiYA-001CZ9-0s@gemulon.postgresql.org> (raw)

Sync signatures of gbt_var_consistent() and gbt_num_consistent().

For some odd reason we pass the strategy number to gbt_num_consistent
as "const StrategyNumber *strategy".  There's no reason for that:
it almost certainly costs more at both callers and callee to pass a
pointer than to pass a small integer value.  And it's inconsistent
with gbt_var_consistent(), so fix it.

gbt_var_consistent() had its own infelicity, which was not marking
the input "key" value const.  Fix that too while we're here.

This is primarily cosmetic, so I see no need to backpatch.

Author: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/AH*AvQCYKhQGVvPWi1GiU4oY.8.1781609375063.Hmail.3020001251@tju.edu.cn

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4b808ed77cd95dd1d6bf7acdb8ee4f8eb027422c

Modified Files
--------------
contrib/btree_gist/btree_bool.c      | 2 +-
contrib/btree_gist/btree_cash.c      | 2 +-
contrib/btree_gist/btree_date.c      | 2 +-
contrib/btree_gist/btree_enum.c      | 2 +-
contrib/btree_gist/btree_float4.c    | 2 +-
contrib/btree_gist/btree_float8.c    | 2 +-
contrib/btree_gist/btree_inet.c      | 4 ++--
contrib/btree_gist/btree_int2.c      | 2 +-
contrib/btree_gist/btree_int4.c      | 2 +-
contrib/btree_gist/btree_int8.c      | 2 +-
contrib/btree_gist/btree_interval.c  | 2 +-
contrib/btree_gist/btree_macaddr.c   | 2 +-
contrib/btree_gist/btree_macaddr8.c  | 2 +-
contrib/btree_gist/btree_oid.c       | 2 +-
contrib/btree_gist/btree_time.c      | 4 ++--
contrib/btree_gist/btree_ts.c        | 4 ++--
contrib/btree_gist/btree_utils_num.c | 4 ++--
contrib/btree_gist/btree_utils_num.h | 2 +-
contrib/btree_gist/btree_utils_var.c | 2 +-
contrib/btree_gist/btree_utils_var.h | 2 +-
contrib/btree_gist/btree_uuid.c      | 2 +-
21 files changed, 25 insertions(+), 25 deletions(-)



Message-ID: <E1wfiYA-001CZ9-0s@gemulon.postgresql.org>
Permalink:  ../E1wfiYA-001CZ9-0s@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1wfiYA-001CZ9-0s@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: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Sync signatures of gbt_var_consistent() and gbt_num_consistent()
  In-Reply-To: <E1wfiYA-001CZ9-0s@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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox