Minimize memory allocation for void (but not null) value.

This commit is contained in:
Teodor Sigaev 2004-03-25 16:50:49 +00:00
parent 7ce822372f
commit fb411a4768

View File

@ -451,6 +451,8 @@ tsvector_in(PG_FUNCTION_ARGS)
if (len > 0)
len = uniqueentry(arr, len, tmpbuf, &buflen);
else
buflen=0;
totallen = CALCDATASIZE(len, buflen);
in = (tsvector *) palloc(totallen);
memset(in, 0, totallen);