Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 7f0e4bb

Browse files
committed
Shave a few cycles in string_agg().
Pavel Stehule
1 parent 1db5af2 commit 7f0e4bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/utils/adt/varlena.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -3621,7 +3621,7 @@ string_agg_finalfn(PG_FUNCTION_ARGS)
36213621
state = PG_ARGISNULL(0) ? NULL : (StringInfo) PG_GETARG_POINTER(0);
36223622

36233623
if (state != NULL)
3624-
PG_RETURN_TEXT_P(cstring_to_text(state->data));
3624+
PG_RETURN_TEXT_P(cstring_to_text_with_len(state->data, state->len));
36253625
else
36263626
PG_RETURN_NULL();
36273627
}

0 commit comments

Comments
 (0)