mirror of
https://github.com/postgres/postgres.git
synced 2025-11-18 02:02:55 +03:00
Fix various hash function uses
These instances were using Datum-returning functions where a lower-level function returning uint32 would be more appropriate. Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://www.postgresql.org/message-id/flat/8246d7ff-f4b7-4363-913e-827dadfeb145%40eisentraut.org
This commit is contained in:
@@ -185,7 +185,7 @@ FileSetPath(char *path, FileSet *fileset, Oid tablespace)
|
||||
static Oid
|
||||
ChooseTablespace(const FileSet *fileset, const char *name)
|
||||
{
|
||||
uint32 hash = hash_any((const unsigned char *) name, strlen(name));
|
||||
uint32 hash = hash_bytes((const unsigned char *) name, strlen(name));
|
||||
|
||||
return fileset->tablespaces[hash % fileset->ntablespaces];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user