Hardened build dimensions check [skip ci]

This commit is contained in:
Andrew Kane committed 2026-11-13 18:51:12 -08:00
1 parent 568fea3ab6
commit 3a6c970e86
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -696,7 +696,7 @@ InitBuildState(HnswBuildState * buildstate, Relation heap, Relation index, Index
errmsg("type not supported for hnsw index")));
/* Require column to have dimensions to be indexed */
if (buildstate->dimensions < 0)
if (buildstate->dimensions < 1)
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("column does not have dimensions")));
+1 -1
View File
@@ -343,7 +343,7 @@ InitBuildState(IvfflatBuildState * buildstate, Relation heap, Relation index, In
errmsg("type not supported for ivfflat index")));
/* Require column to have dimensions to be indexed */
if (buildstate->dimensions < 0)
if (buildstate->dimensions < 1)
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("column does not have dimensions")));