summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorRobert Haas2013-11-18 15:17:07 +0000
committerRobert Haas2013-11-18 15:19:00 +0000
commitf1df4731eea6bc05e0769e9cc789e7304722efe4 (patch)
tree056c5c8b2e1244bcd237de08203848350fa6c1ae /contrib
parent4c697d8f4845823a8af67788b219ffa4516ad14c (diff)
Use cstring_to_text_with_len when length is known.
This avoids a potentially-expensive extra call to strlen(). David Rowley
Diffstat (limited to 'contrib')
-rw-r--r--contrib/pageinspect/fsmfuncs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/pageinspect/fsmfuncs.c b/contrib/pageinspect/fsmfuncs.c
index d0d105fdbd..a91ff224de 100644
--- a/contrib/pageinspect/fsmfuncs.c
+++ b/contrib/pageinspect/fsmfuncs.c
@@ -56,5 +56,5 @@ fsm_page_contents(PG_FUNCTION_ARGS)
}
appendStringInfo(&sinfo, "fp_next_slot: %d\n", fsmpage->fp_next_slot);
- PG_RETURN_TEXT_P(cstring_to_text(sinfo.data));
+ PG_RETURN_TEXT_P(cstring_to_text_with_len(sinfo.data, sinfo.len));
}