This commit is contained in:
Andrew Kane
2024-04-13 16:09:42 -07:00
parent e14fdba8b3
commit 8a4845b52e

View File

@@ -286,6 +286,8 @@ sparsevec_in(PG_FUNCTION_ARGS)
(errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
errmsg("\"%s\" is out of range for type sparsevec", pnstrdup(pt, stringEnd - pt))));
CheckElement(value);
/* Do not store zero values */
if (value != 0)
{
@@ -359,7 +361,6 @@ sparsevec_in(PG_FUNCTION_ARGS)
rvalues[i] = values[i];
CheckIndex(result->indices, i, dim);
CheckElement(rvalues[i]);
}
PG_RETURN_POINTER(result);