git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1db5af2)
Shave a few cycles in string_agg().
2011年12月21日 13:53:50 +0000 (08:53 -0500)
2011年12月21日 13:53:50 +0000 (08:53 -0500)
Pavel Stehule


diff --git a/src/backend/utils/adt/varlena.c b/src/backend/utils/adt/varlena.c
index f1d582f4b24977fa31ea193d7073135073b472d8..95893386aae6ef4f06afbef3a2082dbd558dc254 100644 (file)
--- a/src/backend/utils/adt/varlena.c
+++ b/src/backend/utils/adt/varlena.c
@@ -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();
}
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /