pgvector.git / summary / log / commit / refs

commit    a0b8e5df188c4e2ac2cde837b4e9406792adb42f
Author:   Andrew Kane <andrew@ankane.org>
Date:     Fri Aug 14 05:10:14 2026 +0000

    Fixed conversion code in array_to_sparsevec [skip ci]


src/sparsevec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sparsevec.c b/src/sparsevec.c index 95f4e899..be55fbec 100644 --- a/src/sparsevec.c +++ b/src/sparsevec.c @@ -747,7 +747,7 @@ array_to_sparsevec(PG_FUNCTION_ARGS) else if (ARR_ELEMTYPE(array) == NUMERICOID) { for (int i = 0; i < nelemsp; i++) - nnz += IS_NOT_ZERO(DirectFunctionCall1(numeric_float4, elemsp[i])); + nnz += IS_NOT_ZERO(DatumGetFloat4(DirectFunctionCall1(numeric_float4, elemsp[i]))); } else { [parent: 5a058d621869]