pgsql: Add a caveat to hash_seq_init_with_hash_value() header comment

From: Alexander Korotkov <akorotkov(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add a caveat to hash_seq_init_with_hash_value() header comment
Date: 2024-08-08 08:50:12
Message-ID: E1sbyqa-003FL7-8c@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Add a caveat to hash_seq_init_with_hash_value() header comment

The typical use-case for hash_seq_init_with_hash_value() is syscache
callback. Add a caveat that the default hash function doesn't match syscache
hash function. So, one needs to define a custom hash function.

Reported-by: Pavel Stehule
Discussion: https://postgr.es/m/CAFj8pRAXmv6eyYx%3DE_BTfyK%3DO_%2ByOF8sXB%3D0bn9eOBt90EgWRA%40mail.gmail.com
Reviewed-by: Pavel Stehule

Branch
------
master

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

Modified Files
--------------
src/backend/utils/hash/dynahash.c | 5 +++++
1 file changed, 5 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Alexander Korotkov 2024-08-08 08:51:17 Re: pgsql: Introduce hash_search_with_hash_value() function
Previous Message Heikki Linnakangas 2024-08-08 07:28:40 pgsql: Fix pg_rewind debug output to print the source timeline history