mirror of
https://github.com/postgres/postgres.git
synced 2025-08-06 18:42:54 +03:00
Minimize memory allocation for void (but not null) value.
This commit is contained in:
@@ -451,6 +451,8 @@ tsvector_in(PG_FUNCTION_ARGS)
|
|||||||
|
|
||||||
if (len > 0)
|
if (len > 0)
|
||||||
len = uniqueentry(arr, len, tmpbuf, &buflen);
|
len = uniqueentry(arr, len, tmpbuf, &buflen);
|
||||||
|
else
|
||||||
|
buflen=0;
|
||||||
totallen = CALCDATASIZE(len, buflen);
|
totallen = CALCDATASIZE(len, buflen);
|
||||||
in = (tsvector *) palloc(totallen);
|
in = (tsvector *) palloc(totallen);
|
||||||
memset(in, 0, totallen);
|
memset(in, 0, totallen);
|
||||||
|
Reference in New Issue
Block a user