}
/* Append ORDER BY at the end of query to ensure output ordering */
- appendStringInfo(&buf, " ORDER BY c.relname, a.attnum");
+ appendStringInfoString(&buf, " ORDER BY c.relname, a.attnum");
/* Fetch the data */
res = PQexec(conn, buf.data);
(ginxlogRecompressDataLeaf *) payload;
if (XLogRecHasBlockImage(record, 0))
- appendStringInfo(buf, " (full page image)");
+ appendStringInfoString(buf, " (full page image)");
else
desc_recompress_leaf(buf, insertData);
}
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);
}
{
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:
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:
}
if (XactCompletionForceSyncCommit(parsed.xinfo))
- appendStringInfo(buf, "; sync");
+ appendStringInfoString(buf, "; sync");
if (parsed.xinfo & XACT_XINFO_HAS_ORIGIN)
{
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))
rnode.spcNode, rnode.dbNode, rnode.relNode,
blk);
if (XLogRecHasBlockImage(record, block_id))
- appendStringInfo(buf, " FPW");
+ appendStringInfoString(buf, " FPW");
}
}
#endif /* WAL_DEBUG */
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;
{
OnConflictExpr *confl = query->onConflict;
- appendStringInfo(buf, " ON CONFLICT");
+ appendStringInfoString(buf, " ON CONFLICT");
if (confl->arbiterElems)
{
{
xmldata_root_element_start(result, xmltn, xmlschema,
targetns, top_level);
- appendStringInfoString(result, "\n");
+ appendStringInfoChar(result, '\n');
}
if (xmlschema)
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);
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);
/* Separate key-value pairs with spaces */
if (conninfo_buf.len != 0)
- appendPQExpBufferStr(&conninfo_buf, " ");
+ appendPQExpBufferChar(&conninfo_buf, ' ');
/*
* Write "keyword=value" pieces, the value string is escaped and/or
* search for hardcoded "DROP CONSTRAINT" instead.
*/
if (strcmp(te->desc, "DEFAULT") == 0)
- appendPQExpBuffer(ftStmt, "%s", dropStmt);
+ appendPQExpBufferStr(ftStmt, dropStmt);
else
{
if (strcmp(te->desc, "CONSTRAINT") == 0 ||
/* append the list of column names if required */
if (dopt->column_inserts)
{
- appendPQExpBufferStr(insertStmt, "(");
+ appendPQExpBufferChar(insertStmt, '(');
for (field = 0; field < nfields; field++)
{
if (field > 0)
appendPQExpBufferStr(q, " FAMILY ");
if (strcmp(opcfamilynsp, opcinfo->dobj.namespace->dobj.name) != 0)
appendPQExpBuffer(q, "%s.", fmtId(opcfamilynsp));
- appendPQExpBuffer(q, "%s", fmtId(opcfamilyname));
+ appendPQExpBufferStr(q, fmtId(opcfamilyname));
}
appendPQExpBufferStr(q, " AS\n ");
if (actual_atts == 0)
appendPQExpBufferStr(q, " (");
else
- appendPQExpBufferStr(q, ",");
+ appendPQExpBufferChar(q, ',');
appendPQExpBufferStr(q, "\n ");
actual_atts++;
if (!PQgetisnull(res, i, 5))
{
if (tmpbuf.len > 0)
- appendPQExpBufferStr(&tmpbuf, " ");
+ appendPQExpBufferChar(&tmpbuf, ' ');
appendPQExpBuffer(&tmpbuf, _("collate %s"),
PQgetvalue(res, i, 5));
}
if (strcmp(PQgetvalue(res, i, 3), "t") == 0)
{
if (tmpbuf.len > 0)
- appendPQExpBufferStr(&tmpbuf, " ");
+ appendPQExpBufferChar(&tmpbuf, ' ');
appendPQExpBufferStr(&tmpbuf, _("not null"));
}
if (strlen(PQgetvalue(res, i, 2)) != 0)
{
if (tmpbuf.len > 0)
- appendPQExpBufferStr(&tmpbuf, " ");
+ appendPQExpBufferChar(&tmpbuf, ' ');
/* translator: default values of column definitions */
appendPQExpBuffer(&tmpbuf, _("default %s"),
PQgetvalue(res, i, 2));
printfPQExpBuffer(&buf, "%*s %s",
sw, "", PQgetvalue(result, i, 0));
if (i < tuples - 1)
- appendPQExpBufferStr(&buf, ",");
+ appendPQExpBufferChar(&buf, ',');
printTableAddFooter(&cont, buf.data);
}
appendPQExpBufferStr(&sql, " VERBOSE");
if (table)
appendPQExpBuffer(&sql, " %s", table);
- appendPQExpBufferStr(&sql, ";");
+ appendPQExpBufferChar(&sql, ';');
conn = connectDatabase(dbname, host, port, username, prompt_password,
progname, false);
if (lc_ctype)
appendPQExpBuffer(&sql, " LC_CTYPE '%s'", lc_ctype);
- appendPQExpBufferStr(&sql, ";");
+ appendPQExpBufferChar(&sql, ';');
/* No point in trying to use postgres db when creating postgres db. */
if (maintenance_db == NULL && strcmp(dbname, "postgres") == 0)
{
printfPQExpBuffer(&sql, "COMMENT ON DATABASE %s IS ", fmtId(dbname));
appendStringLiteralConn(&sql, comment, conn);
- appendPQExpBufferStr(&sql, ";");
+ appendPQExpBufferChar(&sql, ';');
if (echo)
printf("%s\n", sql.data);
appendPQExpBuffer(&sql, "%s", fmtId(cell->val));
}
}
- appendPQExpBufferStr(&sql, ";");
+ appendPQExpBufferChar(&sql, ';');
if (echo)
printf("%s\n", sql.data);
appendPQExpBuffer(&sql, " SCHEMA %s", name);
else if (strcmp(type, "DATABASE") == 0)
appendPQExpBuffer(&sql, " DATABASE %s", fmtId(name));
- appendPQExpBufferStr(&sql, ";");
+ appendPQExpBufferChar(&sql, ';');
conn = connectDatabase(dbname, host, port, username, prompt_password,
progname, false);
ntups = PQntuples(res);
for (i = 0; i < ntups; i++)
{
- appendPQExpBuffer(&buf, "%s",
+ appendPQExpBufferStr(&buf,
fmtQualifiedId(PQserverVersion(conn),
PQgetvalue(res, i, 1),
PQgetvalue(res, i, 0)));
sep = comma;
}
if (sep != paren)
- appendPQExpBufferStr(sql, ")");
+ appendPQExpBufferChar(sql, ')');
}
else
{