projects
/
users
/
heikki
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7ce8223
)
Minimize memory allocation for void (but not null) value.
author
Teodor Sigaev
<teodor@sigaev.ru>
Thu, 25 Mar 2004 16:50:49 +0000
(16:50 +0000)
committer
Teodor Sigaev
<teodor@sigaev.ru>
Thu, 25 Mar 2004 16:50:49 +0000
(16:50 +0000)
contrib/tsearch2/tsvector.c
patch
|
blob
|
blame
|
history
diff --git
a/contrib/tsearch2/tsvector.c
b/contrib/tsearch2/tsvector.c
index ea50421eb73bed05e1dbf2b99453f4ab39cb6a8b..5670c0cf5fc8414f20e153f81e2ce547b25b9427 100644
(file)
--- a/
contrib/tsearch2/tsvector.c
+++ b/
contrib/tsearch2/tsvector.c
@@
-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);