mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-06 04:30:56 +08:00
DRY HNSW procinfo
This commit is contained in:
@@ -153,6 +153,19 @@ HnswOptionalProcInfo(Relation index, uint16 procnum)
|
||||
return index_getprocinfo(index, 1, procnum);
|
||||
}
|
||||
|
||||
/*
|
||||
* Set procinfo
|
||||
*/
|
||||
void
|
||||
HnswSetProcinfo(Relation index, FmgrInfo **procinfo, FmgrInfo **normprocinfo, Oid *collation)
|
||||
{
|
||||
*procinfo = index_getprocinfo(index, 1, HNSW_DISTANCE_PROC);
|
||||
*collation = index->rd_indcollation[0];
|
||||
|
||||
if (normprocinfo != NULL)
|
||||
*normprocinfo = HnswOptionalProcInfo(index, HNSW_NORM_PROC);
|
||||
}
|
||||
|
||||
/*
|
||||
* Normalize value
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user