mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-12 23:56:55 +08:00
Restored collation for consistency [skip ci]
This commit is contained in:
@@ -377,7 +377,7 @@ typedef struct HnswVacuumState
|
|||||||
int HnswGetM(Relation index);
|
int HnswGetM(Relation index);
|
||||||
int HnswGetEfConstruction(Relation index);
|
int HnswGetEfConstruction(Relation index);
|
||||||
FmgrInfo *HnswOptionalProcInfo(Relation index, uint16 procnum);
|
FmgrInfo *HnswOptionalProcInfo(Relation index, uint16 procnum);
|
||||||
Datum HnswNormValue(const HnswTypeInfo * typeInfo, Datum value);
|
Datum HnswNormValue(const HnswTypeInfo * typeInfo, Oid collation, Datum value);
|
||||||
bool HnswCheckNorm(FmgrInfo *procinfo, Oid collation, Datum value);
|
bool HnswCheckNorm(FmgrInfo *procinfo, Oid collation, Datum value);
|
||||||
Buffer HnswNewBuffer(Relation index, ForkNumber forkNum);
|
Buffer HnswNewBuffer(Relation index, ForkNumber forkNum);
|
||||||
void HnswInitPage(Buffer buf, Page page);
|
void HnswInitPage(Buffer buf, Page page);
|
||||||
|
|||||||
@@ -498,7 +498,7 @@ InsertTuple(Relation index, Datum *values, bool *isnull, ItemPointer heaptid, Hn
|
|||||||
if (!HnswCheckNorm(buildstate->normprocinfo, buildstate->collation, value))
|
if (!HnswCheckNorm(buildstate->normprocinfo, buildstate->collation, value))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
value = HnswNormValue(typeInfo, value);
|
value = HnswNormValue(typeInfo, buildstate->collation, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get datum size */
|
/* Get datum size */
|
||||||
|
|||||||
@@ -630,7 +630,7 @@ HnswInsertTuple(Relation index, Datum *values, bool *isnull, ItemPointer heap_ti
|
|||||||
if (!HnswCheckNorm(normprocinfo, collation, value))
|
if (!HnswCheckNorm(normprocinfo, collation, value))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
value = HnswNormValue(typeInfo, value);
|
value = HnswNormValue(typeInfo, collation, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
HnswInsertTupleOnDisk(index, value, values, isnull, heap_tid, false);
|
HnswInsertTupleOnDisk(index, value, values, isnull, heap_tid, false);
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ GetScanValue(IndexScanDesc scan)
|
|||||||
|
|
||||||
/* Fine if normalization fails */
|
/* Fine if normalization fails */
|
||||||
if (so->normprocinfo != NULL)
|
if (so->normprocinfo != NULL)
|
||||||
value = HnswNormValue(so->typeInfo, value);
|
value = HnswNormValue(so->typeInfo, so->collation, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
|
|||||||
@@ -156,9 +156,9 @@ HnswOptionalProcInfo(Relation index, uint16 procnum)
|
|||||||
* Normalize value
|
* Normalize value
|
||||||
*/
|
*/
|
||||||
Datum
|
Datum
|
||||||
HnswNormValue(const HnswTypeInfo * typeInfo, Datum value)
|
HnswNormValue(const HnswTypeInfo * typeInfo, Oid collation, Datum value)
|
||||||
{
|
{
|
||||||
return DirectFunctionCall1(typeInfo->normalize, value);
|
return DirectFunctionCall1Coll(typeInfo->normalize, collation, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user