mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-01 10:11:20 +08:00
Fixed type check [skip ci]
This commit is contained in:
@@ -150,11 +150,16 @@ HnswOptionalProcInfo(Relation index, uint16 procnum)
|
||||
}
|
||||
|
||||
/*
|
||||
* Get vector type
|
||||
* Get type
|
||||
*/
|
||||
HnswType
|
||||
HnswGetType(Relation index)
|
||||
{
|
||||
Oid typid = TupleDescAttr(index->rd_att, 0)->atttypid;
|
||||
|
||||
if (typid == BITOID || typid == VARBITOID)
|
||||
return HNSW_TYPE_BIT;
|
||||
|
||||
return HNSW_TYPE_VECTOR;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user