mirror of
https://github.com/postgres/postgres.git
synced 2025-07-18 17:42:25 +03:00
Shave a few cycles in string_agg().
Pavel Stehule
This commit is contained in:
@ -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();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user