MCPcopy Create free account
hub / github.com/apache/cloudberry / encoding_encode_strinfo

Function encoding_encode_strinfo

contrib/formatter_fixedwidth/fixedwidth.c:225–239  ·  view source on GitHub ↗

* encoding_encode_strinfo * * convert a given stringinfo 'strinfo' to the appropriate (pre-defined) * encoding (encoding will only be done if really needed). */

Source from the content-addressed store, hash-verified

223 * encoding (encoding will only be done if really needed).
224 */
225static void
226encoding_encode_strinfo(FunctionCallInfo fcinfo, StringInfo strinfo, bool is_import)
227{
228 char *cvt = NULL;
229
230 FORMATTER_ENCODE_STRING(fcinfo, strinfo->data, strinfo->len, cvt, is_import);
231
232 if (cvt != NULL && cvt != strinfo->data)
233 {
234 /* transfer converted data back to strinfo */
235 resetStringInfo(strinfo);
236 appendStringInfoString(strinfo, cvt);
237 pfree(cvt);
238 }
239}
240
241
242static char*

Callers 2

make_val_with_blanksFunction · 0.85
fixedwidth_inFunction · 0.85

Calls 3

resetStringInfoFunction · 0.85
appendStringInfoStringFunction · 0.85
pfreeFunction · 0.50

Tested by

no test coverage detected