Re: pgsql: Introduce hash_search_with_hash_value() function - Mailing list pgsql-committers

From Alexander Korotkov
Subject Re: pgsql: Introduce hash_search_with_hash_value() function
Date
Msg-id CAPpHfdvqgB6YEgExEND88notzb_bf9kq8bfzozo+fUohhWCouQ@mail.gmail.com
Whole thread Raw
In response to Re: pgsql: Introduce hash_search_with_hash_value() function  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-committers
On Thu, Aug 8, 2024 at 7:45 AM Pavel Stehule <pavel.stehule@gmail.com> wrote:
> st 7. 8. 2024 v 22:25 odesílatel Alexander Korotkov <aekorotkov@gmail.com> napsal:
>>
>> On Wed, Aug 7, 2024 at 1:34 PM Pavel Stehule <pavel.stehule@gmail.com> wrote:
>> > st 7. 8. 2024 v 12:22 odesílatel Alexander Korotkov <aekorotkov@gmail.com> napsal:
>> >> Thank you.
>> >> Please see 40064a8ee1 takes special efforts to match HTAB hash
>> >> function to syscache hash function.  By default, their hash values
>> >> don't match and you can't simply use syscache hash value to search
>> >> HTAB.  This probably should be mentioned in the header comment of
>> >> hash_seq_init_with_hash_value().
>> >
>> >
>> > yes, enhancing doc should be great + maybe assert
>>
>> Please check the patch, which adds a caveat to the function header
>> comment.  I don't particularly like an assert here, because there
>> could be use-cases besides syscache callbacks, which could legally use
>> default hash function.
>
>
> looks well

Thank you, pushed.

------
Regards,
Alexander Korotkov
Supabase



pgsql-committers by date:

Previous
From: Alexander Korotkov
Date:
Subject: pgsql: Add a caveat to hash_seq_init_with_hash_value() header comment
Next
From: Alvaro Herrera
Date:
Subject: pgsql: Refactor error messages to reduce duplication