Shave a few cycles in string_agg().

Pavel Stehule
This commit is contained in:
Robert Haas 2011-12-21 08:53:50 -05:00
parent 1db5af2794
commit 7f0e4bb82e
1 changed files with 1 additions and 1 deletions

View File

@ -3621,7 +3621,7 @@ string_agg_finalfn(PG_FUNCTION_ARGS)
state = PG_ARGISNULL(0) ? NULL : (StringInfo) PG_GETARG_POINTER(0);
if (state != NULL)
PG_RETURN_TEXT_P(cstring_to_text(state->data));
PG_RETURN_TEXT_P(cstring_to_text_with_len(state->data, state->len));
else
PG_RETURN_NULL();
}