diff --git a/src/hnswinsert.c b/src/hnswinsert.c index 5d6e061..50181ea 100644 --- a/src/hnswinsert.c +++ b/src/hnswinsert.c @@ -614,13 +614,12 @@ HnswInsertTuple(Relation index, Datum *values, bool *isnull, ItemPointer heap_ti Datum value; FmgrInfo *normprocinfo; Oid collation = index->rd_indcollation[0]; - HnswType type = HnswGetType(index); /* Detoast once for all calls */ value = PointerGetDatum(PG_DETOAST_DATUM(values[0])); /* Check value */ - HnswCheckValue(value, type); + HnswCheckValue(value, HnswGetType(index)); /* Normalize if needed */ normprocinfo = HnswOptionalProcInfo(index, HNSW_NORM_PROC);