Moved varbit check [skip ci]

This commit is contained in:
Andrew Kane
2024-04-23 14:22:05 -07:00
parent 4305e723cc
commit f26bd7054d

View File

@@ -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 */