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