Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd0c8cf2

Browse files
committed
Add a caveat to hash_seq_init_with_hash_value() header comment
The typical use-case for hash_seq_init_with_hash_value() is syscachecallback. Add a caveat that the default hash function doesn't match syscachehash function. So, one needs to define a custom hash function.Reported-by: Pavel StehuleDiscussion:https://postgr.es/m/CAFj8pRAXmv6eyYx%3DE_BTfyK%3DO_%2ByOF8sXB%3D0bn9eOBt90EgWRA%40mail.gmail.comReviewed-by: Pavel Stehule
1 parent49dc191 commitd0c8cf2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

‎src/backend/utils/hash/dynahash.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1395,6 +1395,11 @@ hash_seq_init(HASH_SEQ_STATUS *status, HTAB *hashp)
13951395
/*
13961396
* Same as above but scan by the given hash value.
13971397
* See also hash_seq_search().
1398+
*
1399+
* NOTE: the default hash function doesn't match syscache hash function.
1400+
* Thus, if you're going to use this function in syscache callback, make sure
1401+
* you're using custom hash function. See relatt_cache_syshash()
1402+
* for example.
13981403
*/
13991404
void
14001405
hash_seq_init_with_hash_value(HASH_SEQ_STATUS*status,HTAB*hashp,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp