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

Function appendStringInfo

src/common/stringinfo.c:106–128  ·  view source on GitHub ↗

* appendStringInfo * * Format text data under the control of fmt (an sprintf-style format string) * and append it to whatever is already in str. More space is allocated * to str if necessary. This is sort of like a combination of sprintf and * strcat. */

Source from the content-addressed store, hash-verified

104 * strcat.
105 */
106void
107appendStringInfo(StringInfo str, const char *fmt,...)
108{
109 int save_errno = errno;
110
111 for (;;)
112 {
113 va_list args;
114 int needed;
115
116 /* Try to format the data. */
117 errno = save_errno;
118 va_start(args, fmt);
119 needed = appendStringInfoVA(str, fmt, args);
120 va_end(args);
121
122 if (needed == 0)
123 break; /* success */
124
125 /* Increase the buffer size and try again. */
126 enlargeStringInfo(str, needed);
127 }
128}
129
130/*
131 * appendStringInfoVA

Callers 15

deparseLockingClauseFunction · 0.85
deparseFromExprForRelFunction · 0.85
deparseRangeTblRefFunction · 0.85
deparseInsertSqlFunction · 0.85
rebuildInsertSqlFunction · 0.85
deparseUpdateSqlFunction · 0.85
deparseDirectUpdateSqlFunction · 0.85
deparseDirectDeleteSqlFunction · 0.85
deparseAnalyzeSizeSqlFunction · 0.85
deparseTruncateSqlFunction · 0.85
deparseColumnRefFunction · 0.85
deparseRelationFunction · 0.85

Calls 2

appendStringInfoVAFunction · 0.85
enlargeStringInfoFunction · 0.85

Tested by 15

pg_output_beginFunction · 0.68
pg_decode_commit_txnFunction · 0.68
pg_decode_prepare_txnFunction · 0.68
print_literalFunction · 0.68
pg_decode_messageFunction · 0.68
pg_output_stream_startFunction · 0.68
pg_decode_stream_stopFunction · 0.68
pg_decode_stream_abortFunction · 0.68
pg_decode_stream_prepareFunction · 0.68
pg_decode_stream_commitFunction · 0.68