mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-03 19:20:56 +08:00
Moved IvfflatGetType [skip ci]
This commit is contained in:
@@ -61,27 +61,6 @@ IvfflatOptionalProcInfo(Relation index, uint16 procnum)
|
||||
return index_getprocinfo(index, 1, procnum);
|
||||
}
|
||||
|
||||
/*
|
||||
* Get type
|
||||
*/
|
||||
IvfflatType
|
||||
IvfflatGetType(Relation index)
|
||||
{
|
||||
FmgrInfo *procinfo = IvfflatOptionalProcInfo(index, IVFFLAT_TYPE_SUPPORT_PROC);
|
||||
Oid typid = TupleDescAttr(index->rd_att, 0)->atttypid;
|
||||
IvfflatType result;
|
||||
|
||||
if (procinfo == NULL)
|
||||
return IVFFLAT_TYPE_VECTOR;
|
||||
|
||||
result = (IvfflatType) DatumGetInt32(FunctionCall1(procinfo, ObjectIdGetDatum(typid)));
|
||||
|
||||
if (result == IVFFLAT_TYPE_UNSUPPORTED)
|
||||
elog(ERROR, "type not supported for ivfflat index");
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* Normalize value
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user