mirror of
https://github.com/pgvector/pgvector.git
synced 2026-06-06 05:51:21 +08:00
Moved varbit check [skip ci]
This commit is contained in:
@@ -678,12 +678,8 @@ HnswSharedMemoryAlloc(Size size, void *state)
|
||||
static int
|
||||
GetMaxDimensions(Relation index)
|
||||
{
|
||||
Oid typid = TupleDescAttr(index->rd_att, 0)->atttypid;
|
||||
FmgrInfo *procinfo = HnswOptionalProcInfo(index, HNSW_MAX_DIMS_PROC);
|
||||
|
||||
if (typid == VARBITOID)
|
||||
elog(ERROR, "type not supported for hnsw index");
|
||||
|
||||
if (procinfo == NULL)
|
||||
return HNSW_MAX_DIM;
|
||||
|
||||
@@ -707,6 +703,9 @@ InitBuildState(HnswBuildState * buildstate, Relation heap, Relation index, Index
|
||||
buildstate->efConstruction = HnswGetEfConstruction(index);
|
||||
buildstate->dimensions = TupleDescAttr(index->rd_att, 0)->atttypmod;
|
||||
|
||||
if (TupleDescAttr(index->rd_att, 0)->atttypid == VARBITOID)
|
||||
elog(ERROR, "type not supported for hnsw index");
|
||||
|
||||
maxDimensions = GetMaxDimensions(index);
|
||||
|
||||
/* Require column to have dimensions to be indexed */
|
||||
|
||||
Reference in New Issue
Block a user