mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-13 08:06:54 +08:00
Removed unneeded allocation
This commit is contained in:
@@ -464,7 +464,6 @@ array_to_vector(PG_FUNCTION_ARGS)
|
|||||||
bool typbyval;
|
bool typbyval;
|
||||||
char typalign;
|
char typalign;
|
||||||
Datum *elemsp;
|
Datum *elemsp;
|
||||||
bool *nullsp;
|
|
||||||
int nelemsp;
|
int nelemsp;
|
||||||
|
|
||||||
if (ARR_NDIM(array) > 1)
|
if (ARR_NDIM(array) > 1)
|
||||||
@@ -478,7 +477,7 @@ array_to_vector(PG_FUNCTION_ARGS)
|
|||||||
errmsg("array must not contain nulls")));
|
errmsg("array must not contain nulls")));
|
||||||
|
|
||||||
get_typlenbyvalalign(ARR_ELEMTYPE(array), &typlen, &typbyval, &typalign);
|
get_typlenbyvalalign(ARR_ELEMTYPE(array), &typlen, &typbyval, &typalign);
|
||||||
deconstruct_array(array, ARR_ELEMTYPE(array), typlen, typbyval, typalign, &elemsp, &nullsp, &nelemsp);
|
deconstruct_array(array, ARR_ELEMTYPE(array), typlen, typbyval, typalign, &elemsp, NULL, &nelemsp);
|
||||||
|
|
||||||
CheckDim(nelemsp);
|
CheckDim(nelemsp);
|
||||||
CheckExpectedDim(typmod, nelemsp);
|
CheckExpectedDim(typmod, nelemsp);
|
||||||
|
|||||||
Reference in New Issue
Block a user