1
0
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:
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) 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);