#include "postgres.h"
#include "access/hash.h"
Go to the source code of this file.
Functions | |
uint32 | string_hash (const void *key, Size keysize) |
uint32 | tag_hash (const void *key, Size keysize) |
uint32 | oid_hash (const void *key, Size keysize) |
uint32 | bitmap_hash (const void *key, Size keysize) |
int | bitmap_match (const void *key1, const void *key2, Size keysize) |
Definition at line 75 of file hashfn.c.
References Assert, and bms_hash_value().
{ Assert(keysize == sizeof(Bitmapset *)); return bms_hash_value(*((const Bitmapset *const *) key)); }
int bitmap_match | ( | const void * | key1, | |
const void * | key2, | |||
Size | keysize | |||
) |
Definition at line 63 of file hashfn.c.
References Assert, DatumGetUInt32, and hash_uint32().
{ Assert(keysize == sizeof(Oid)); return DatumGetUInt32(hash_uint32((uint32) *((const Oid *) key))); }
Definition at line 33 of file hashfn.c.
References DatumGetUInt32, hash_any(), and Min.
Referenced by hash_create().
{ /* * If the string exceeds keysize-1 bytes, we want to hash only that many, * because when it is copied into the hash table it will be truncated at * that length. */ Size s_len = strlen((const char *) key); s_len = Min(s_len, keysize - 1); return DatumGetUInt32(hash_any((const unsigned char *) key, (int) s_len)); }
Definition at line 51 of file hashfn.c.
References DatumGetUInt32, and hash_any().
{ return DatumGetUInt32(hash_any((const unsigned char *) key, (int) keysize)); }