From 0c1c8e1228b6487a4ecee21d2d00799603625445 Mon Sep 17 00:00:00 2001 From: Aleksander Alekseev Date: Tue, 14 Apr 2026 17:59:58 +0300 Subject: [PATCH v1] Miscellaneous little fixes - Fix two "fist" typos in comments in hyperloglog.c and indxpath.c. - Fix incorrect IPv6 address width in a comment in network.c: IPv6 addresses are 128 bits, not 64. - Remove the oid_hash macro from hashfn.h. The last real caller was removed in commit 4a14f13a0ab in December 2014, which also added the "Remove me eventually" notice. Author: Aleksander Alekseev Reviewed-by: TODO FIXME Discussion: TODO FIXME --- src/backend/lib/hyperloglog.c | 2 +- src/backend/optimizer/path/indxpath.c | 2 +- src/backend/utils/adt/network.c | 2 +- src/backend/utils/hash/dynahash.c | 2 +- src/include/common/hashfn.h | 2 -- 5 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/backend/lib/hyperloglog.c b/src/backend/lib/hyperloglog.c index c74f11217ef..3bc6aa0548f 100644 --- a/src/backend/lib/hyperloglog.c +++ b/src/backend/lib/hyperloglog.c @@ -228,7 +228,7 @@ estimateHyperLogLog(hyperLogLogState *cState) * starting from the first, reading from most significant to least significant * bits. * - * Example (when considering fist 10 bits of x): + * Example (when considering first 10 bits of x): * * rho(x = 0b1000000000) returns 1 * rho(x = 0b0010000000) returns 3 diff --git a/src/backend/optimizer/path/indxpath.c b/src/backend/optimizer/path/indxpath.c index 430e06dcaaa..f76a5373c4b 100644 --- a/src/backend/optimizer/path/indxpath.c +++ b/src/backend/optimizer/path/indxpath.c @@ -1187,7 +1187,7 @@ typedef struct Oid inputcollid; /* OID of the OpClause input collation */ int argindex; /* index of the clause in the list of * arguments */ - int groupindex; /* value of argindex for the fist clause in + int groupindex; /* value of argindex for the first clause in * the group of similar clauses */ } OrArgIndexMatch; diff --git a/src/backend/utils/adt/network.c b/src/backend/utils/adt/network.c index c7e0828764e..f4bf9c3b532 100644 --- a/src/backend/utils/adt/network.c +++ b/src/backend/utils/adt/network.c @@ -551,7 +551,7 @@ network_abbrev_abort(int memtupcount, SortSupport ssup) * all their subnet bits *must* be zero (1.2.3.0/24). * * IPv4 and IPv6 are identical in this makeup, with the difference being that - * IPv4 addresses have a maximum of 32 bits compared to IPv6's 64 bits, so in + * IPv4 addresses have a maximum of 32 bits compared to IPv6's 128 bits, so in * IPv6 each part may be larger. * * inet/cidr types compare using these sorting rules. If inequality is detected diff --git a/src/backend/utils/hash/dynahash.c b/src/backend/utils/hash/dynahash.c index 20610f96e7b..dd3e50d6654 100644 --- a/src/backend/utils/hash/dynahash.c +++ b/src/backend/utils/hash/dynahash.c @@ -346,7 +346,7 @@ string_compare(const char *key1, const char *key2, Size keysize) * Neither tabname nor *info need persist after the hash_create() call. * * Note: It is deprecated for callers of hash_create() to explicitly specify - * string_hash, tag_hash, uint32_hash, or oid_hash. Just set HASH_STRINGS or + * string_hash, tag_hash, or uint32_hash. Just set HASH_STRINGS or * HASH_BLOBS. Use HASH_FUNCTION only when you want something other than * one of these. * diff --git a/src/include/common/hashfn.h b/src/include/common/hashfn.h index a40434f798f..222f1d0d249 100644 --- a/src/include/common/hashfn.h +++ b/src/include/common/hashfn.h @@ -56,8 +56,6 @@ extern uint32 string_hash(const void *key, Size keysize); extern uint32 tag_hash(const void *key, Size keysize); extern uint32 uint32_hash(const void *key, Size keysize); -#define oid_hash uint32_hash /* Remove me eventually */ - /* * Combine two 32-bit hash values, resulting in another hash value, with * decent bit mixing. -- 2.43.0