Commit 7f0e4bb8 authored by Robert Haas's avatar Robert Haas

Shave a few cycles in string_agg().

Pavel Stehule
parent 1db5af27
...@@ -3621,7 +3621,7 @@ string_agg_finalfn(PG_FUNCTION_ARGS) ...@@ -3621,7 +3621,7 @@ string_agg_finalfn(PG_FUNCTION_ARGS)
state = PG_ARGISNULL(0) ? NULL : (StringInfo) PG_GETARG_POINTER(0); state = PG_ARGISNULL(0) ? NULL : (StringInfo) PG_GETARG_POINTER(0);
if (state != NULL) 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 else
PG_RETURN_NULL(); PG_RETURN_NULL();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment