mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
Use appendStringInfoString/Char et al where appropriate.
Patch by David Rowley. Backpatch to 9.5, as some of the calls were new in 9.5, and keeping the code in sync with master makes future backpatching easier.
This commit is contained in:
@@ -113,7 +113,7 @@ gin_desc(StringInfo buf, XLogReaderState *record)
|
||||
(ginxlogRecompressDataLeaf *) payload;
|
||||
|
||||
if (XLogRecHasBlockImage(record, 0))
|
||||
appendStringInfo(buf, " (full page image)");
|
||||
appendStringInfoString(buf, " (full page image)");
|
||||
else
|
||||
desc_recompress_leaf(buf, insertData);
|
||||
}
|
||||
@@ -147,7 +147,7 @@ gin_desc(StringInfo buf, XLogReaderState *record)
|
||||
ginxlogVacuumDataLeafPage *xlrec = (ginxlogVacuumDataLeafPage *) rec;
|
||||
|
||||
if (XLogRecHasBlockImage(record, 0))
|
||||
appendStringInfo(buf, " (full page image)");
|
||||
appendStringInfoString(buf, " (full page image)");
|
||||
else
|
||||
desc_recompress_leaf(buf, &xlrec->data);
|
||||
}
|
||||
|
@@ -30,14 +30,14 @@ spg_desc(StringInfo buf, XLogReaderState *record)
|
||||
{
|
||||
spgxlogAddLeaf *xlrec = (spgxlogAddLeaf *) rec;
|
||||
|
||||
appendStringInfo(buf, "add leaf to page");
|
||||
appendStringInfoString(buf, "add leaf to page");
|
||||
appendStringInfo(buf, "; off %u; headoff %u; parentoff %u",
|
||||
xlrec->offnumLeaf, xlrec->offnumHeadLeaf,
|
||||
xlrec->offnumParent);
|
||||
if (xlrec->newPage)
|
||||
appendStringInfo(buf, " (newpage)");
|
||||
appendStringInfoString(buf, " (newpage)");
|
||||
if (xlrec->storesNulls)
|
||||
appendStringInfo(buf, " (nulls)");
|
||||
appendStringInfoString(buf, " (nulls)");
|
||||
}
|
||||
break;
|
||||
case XLOG_SPGIST_MOVE_LEAFS:
|
||||
@@ -63,9 +63,9 @@ spg_desc(StringInfo buf, XLogReaderState *record)
|
||||
appendStringInfo(buf, "ndel %u; nins %u",
|
||||
xlrec->nDelete, xlrec->nInsert);
|
||||
if (xlrec->innerIsParent)
|
||||
appendStringInfo(buf, " (innerIsParent)");
|
||||
appendStringInfoString(buf, " (innerIsParent)");
|
||||
if (xlrec->isRootSplit)
|
||||
appendStringInfo(buf, " (isRootSplit)");
|
||||
appendStringInfoString(buf, " (isRootSplit)");
|
||||
}
|
||||
break;
|
||||
case XLOG_SPGIST_VACUUM_LEAF:
|
||||
|
@@ -232,7 +232,7 @@ xact_desc_commit(StringInfo buf, uint8 info, xl_xact_commit *xlrec, RepOriginId
|
||||
}
|
||||
|
||||
if (XactCompletionForceSyncCommit(parsed.xinfo))
|
||||
appendStringInfo(buf, "; sync");
|
||||
appendStringInfoString(buf, "; sync");
|
||||
|
||||
if (parsed.xinfo & XACT_XINFO_HAS_ORIGIN)
|
||||
{
|
||||
|
@@ -1097,7 +1097,7 @@ XLogInsertRecord(XLogRecData *rdata, XLogRecPtr fpw_lsn)
|
||||
|
||||
if (!debug_reader)
|
||||
{
|
||||
appendStringInfo(&buf, "error decoding record: out of memory");
|
||||
appendStringInfoString(&buf, "error decoding record: out of memory");
|
||||
}
|
||||
else if (!DecodeXLogRecord(debug_reader, (XLogRecord *) recordBuf.data,
|
||||
&errormsg))
|
||||
@@ -9528,7 +9528,7 @@ xlog_outrec(StringInfo buf, XLogReaderState *record)
|
||||
rnode.spcNode, rnode.dbNode, rnode.relNode,
|
||||
blk);
|
||||
if (XLogRecHasBlockImage(record, block_id))
|
||||
appendStringInfo(buf, " FPW");
|
||||
appendStringInfoString(buf, " FPW");
|
||||
}
|
||||
}
|
||||
#endif /* WAL_DEBUG */
|
||||
|
@@ -306,7 +306,7 @@ pairingheap_dump_recurse(StringInfo buf,
|
||||
|
||||
appendStringInfoSpaces(buf, depth * 4);
|
||||
dumpfunc(node, buf, opaque);
|
||||
appendStringInfoString(buf, "\n");
|
||||
appendStringInfoChar(buf, '\n');
|
||||
if (node->first_child)
|
||||
pairingheap_dump_recurse(buf, node->first_child, dumpfunc, opaque, depth + 1, node);
|
||||
prev_or_parent = node;
|
||||
|
@@ -5487,7 +5487,7 @@ get_insert_query_def(Query *query, deparse_context *context)
|
||||
{
|
||||
OnConflictExpr *confl = query->onConflict;
|
||||
|
||||
appendStringInfo(buf, " ON CONFLICT");
|
||||
appendStringInfoString(buf, " ON CONFLICT");
|
||||
|
||||
if (confl->arbiterElems)
|
||||
{
|
||||
|
@@ -2473,7 +2473,7 @@ query_to_xml_internal(const char *query, char *tablename,
|
||||
{
|
||||
xmldata_root_element_start(result, xmltn, xmlschema,
|
||||
targetns, top_level);
|
||||
appendStringInfoString(result, "\n");
|
||||
appendStringInfoChar(result, '\n');
|
||||
}
|
||||
|
||||
if (xmlschema)
|
||||
@@ -2637,7 +2637,7 @@ schema_to_xml_internal(Oid nspid, const char *xmlschema, bool nulls,
|
||||
result = makeStringInfo();
|
||||
|
||||
xmldata_root_element_start(result, xmlsn, xmlschema, targetns, top_level);
|
||||
appendStringInfoString(result, "\n");
|
||||
appendStringInfoChar(result, '\n');
|
||||
|
||||
if (xmlschema)
|
||||
appendStringInfo(result, "%s\n\n", xmlschema);
|
||||
@@ -2815,7 +2815,7 @@ database_to_xml_internal(const char *xmlschema, bool nulls,
|
||||
result = makeStringInfo();
|
||||
|
||||
xmldata_root_element_start(result, xmlcn, xmlschema, targetns, true);
|
||||
appendStringInfoString(result, "\n");
|
||||
appendStringInfoChar(result, '\n');
|
||||
|
||||
if (xmlschema)
|
||||
appendStringInfo(result, "%s\n\n", xmlschema);
|
||||
|
Reference in New Issue
Block a user