appendStringInfo(buf, "scram_client_key='%s' ", client_key);
appendStringInfo(buf, "scram_server_key='%s' ", server_key);
- appendStringInfo(buf, "require_auth='scram-sha-256' ");
+ appendStringInfoString(buf, "require_auth='scram-sha-256' ");
pfree(client_key);
pfree(server_key);
if (es->format == EXPLAIN_FORMAT_TEXT)
{
ExplainIndentText(es);
- appendStringInfo(es->str, "PlannedStmt:\n");
+ appendStringInfoString(es->str, "PlannedStmt:\n");
es->indent++;
}
/* Print various properties as a comma-separated list of flags. */
initStringInfo(&flags);
if (plannedstmt->hasReturning)
- appendStringInfo(&flags, ", hasReturning");
+ appendStringInfoString(&flags, ", hasReturning");
if (plannedstmt->hasModifyingCTE)
- appendStringInfo(&flags, ", hasModifyingCTE");
+ appendStringInfoString(&flags, ", hasModifyingCTE");
if (plannedstmt->canSetTag)
- appendStringInfo(&flags, ", canSetTag");
+ appendStringInfoString(&flags, ", canSetTag");
if (plannedstmt->transientPlan)
- appendStringInfo(&flags, ", transientPlan");
+ appendStringInfoString(&flags, ", transientPlan");
if (plannedstmt->dependsOnRole)
- appendStringInfo(&flags, ", dependsOnRole");
+ appendStringInfoString(&flags, ", dependsOnRole");
if (plannedstmt->parallelModeNeeded)
- appendStringInfo(&flags, ", parallelModeNeeded");
+ appendStringInfoString(&flags, ", parallelModeNeeded");
if (flags.len == 0)
- appendStringInfo(&flags, ", none");
+ appendStringInfoString(&flags, ", none");
ExplainPropertyText("Flags", flags.data + 2, es);
/* Various lists of integers. */
}
else
{
- appendStringInfo(&buf, " not an integer list");
+ appendStringInfoString(&buf, " not an integer list");
Assert(false);
}
if (es->format == EXPLAIN_FORMAT_TEXT)
{
- appendStringInfo(es->str, " (actual ");
+ appendStringInfoString(es->str, " (actual ");
if (es->timing)
appendStringInfo(es->str, "time=%.3f..%.3f ", startup_ms, total_ms);
if (es->format == EXPLAIN_FORMAT_TEXT)
{
ExplainIndentText(es);
- appendStringInfo(es->str, "actual ");
+ appendStringInfoString(es->str, "actual ");
if (es->timing)
appendStringInfo(es->str, "time=%.3f..%.3f ", startup_ms, total_ms);
*failover ? "true" : "false");
if (failover && two_phase)
- appendStringInfo(&cmd, ", ");
+ appendStringInfoString(&cmd, ", ");
if (two_phase)
appendStringInfo(&cmd, "TWO_PHASE %s",
break;
case CT_UPDATE_MISSING:
- appendStringInfo(&err_detail, _("Could not find the row to be updated."));
+ appendStringInfoString(&err_detail, _("Could not find the row to be updated."));
break;
case CT_DELETE_ORIGIN_DIFFERS:
break;
case CT_DELETE_MISSING:
- appendStringInfo(&err_detail, _("Could not find the row to be deleted."));
+ appendStringInfoString(&err_detail, _("Could not find the row to be deleted."));
break;
}
if (err_msg->len > 0)
appendStringInfoChar(err_msg, '\n');
- appendStringInfo(err_msg, "%s", err_detail.data);
+ appendStringInfoString(err_msg, err_detail.data);
}
/*
{
attcnt++;
if (attcnt > 1)
- appendStringInfo(&attsbuf, _(", "));
+ appendStringInfoString(&attsbuf, _(", "));
appendStringInfo(&attsbuf, _("\"%s\""), remoterel->attnames[i]);
}
* Now fetch column names and types.
*/
resetStringInfo(&cmd);
- appendStringInfo(&cmd,
- "SELECT a.attnum,"
- " a.attname,"
- " a.atttypid,"
- " a.attnum = ANY(i.indkey)");
+ appendStringInfoString(&cmd,
+ "SELECT a.attnum,"
+ " a.attname,"
+ " a.atttypid,"
+ " a.attnum = ANY(i.indkey)");
/* Generated columns can be replicated since version 18. */
if (server_version >= 180000)
- appendStringInfo(&cmd, ", a.attgenerated != ''");
+ appendStringInfoString(&cmd, ", a.attgenerated != ''");
appendStringInfo(&cmd,
" FROM pg_catalog.pg_attribute a"
{
Oid fk_type = RIAttType(fk_rel, riinfo->fk_attnums[riinfo->nkeys - 1]);
- appendStringInfo(&querybuf, ") x1 HAVING ");
+ appendStringInfoString(&querybuf, ") x1 HAVING ");
sprintf(paramname, "$%d", riinfo->nkeys);
ri_GenerateQual(&querybuf, "",
paramname, fk_type,
riinfo->agged_period_contained_by_oper,
"pg_catalog.range_agg", ANYMULTIRANGEOID);
- appendStringInfo(&querybuf, "(x1.r)");
+ appendStringInfoString(&querybuf, "(x1.r)");
}
/* Prepare and save the plan */
{
Oid fk_type = RIAttType(fk_rel, riinfo->fk_attnums[riinfo->nkeys - 1]);
- appendStringInfo(&querybuf, ") x1 HAVING ");
+ appendStringInfoString(&querybuf, ") x1 HAVING ");
sprintf(paramname, "$%d", riinfo->nkeys);
ri_GenerateQual(&querybuf, "",
paramname, fk_type,
riinfo->agged_period_contained_by_oper,
"pg_catalog.range_agg", ANYMULTIRANGEOID);
- appendStringInfo(&querybuf, "(x1.r)");
+ appendStringInfoString(&querybuf, "(x1.r)");
}
/* Prepare and save the plan */
/* Intersect the fk with the old pk range */
initStringInfo(&intersectbuf);
- appendStringInfoString(&intersectbuf, "(");
+ appendStringInfoChar(&intersectbuf, '(');
ri_GenerateQual(&intersectbuf, "",
attname, fk_period_type,
riinfo->period_intersect_oper,
paramname, pk_period_type);
- appendStringInfoString(&intersectbuf, ")");
+ appendStringInfoChar(&intersectbuf, ')');
/* Find the remaining history */
initStringInfo(&replacementsbuf);
appendStringInfoString(&user_create, "CREATE ROLE ");
/* should use fmtId here, but we don't know the encoding */
appendStringInfoString(&user_create, PQuser(conn));
- appendStringInfoString(&user_create, ";");
+ appendStringInfoChar(&user_create, ';');
/* Process file till EOF and execute sql statements. */
while (read_one_statement(&sqlstatement, pfile) != EOF)