hashfn.c
来自「PostgreSQL7.4.6 for Linux」· C语言 代码 · 共 43 行
C
43 行
/*------------------------------------------------------------------------- * * hashfn.c * Hash functions for use in dynahash.c hashtables * * * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION * $Header: /cvsroot/pgsql/src/backend/utils/hash/hashfn.c,v 1.19 2003/08/19 01:13:41 tgl Exp $ * *------------------------------------------------------------------------- */#include "postgres.h"#include "access/hash.h"#include "utils/hsearch.h"/* * string_hash: hash function for keys that are null-terminated strings. * * NOTE: this is the default hash function if none is specified. */uint32string_hash(const void *key, Size keysize){ return DatumGetUInt32(hash_any((const unsigned char *) key, (int) strlen((const char *) key)));}/* * tag_hash: hash function for fixed-size tag values */uint32tag_hash(const void *key, Size keysize){ return DatumGetUInt32(hash_any((const unsigned char *) key, (int) keysize));}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?