mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Improve various new-to-v18 appendStringInfo calls
Similar to 8461424fd
, here we adjust a few new locations which were not
using the most suitable appendStringInfo* function for the intended
purpose.
Author: David Rowley <drowleyml@gmail.com
Discussion: https://postgr.es/m/CAApHDvqJnNjueb=Eoj8K+8n0g7nj_AcPWSiCj5RNV4fDejAfqA@mail.gmail.com
This commit is contained in:
@ -3228,7 +3228,7 @@ appendSCRAMKeysInfo(StringInfo buf)
|
||||
|
||||
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);
|
||||
|
@ -292,7 +292,7 @@ overexplain_debug(PlannedStmt *plannedstmt, ExplainState *es)
|
||||
if (es->format == EXPLAIN_FORMAT_TEXT)
|
||||
{
|
||||
ExplainIndentText(es);
|
||||
appendStringInfo(es->str, "PlannedStmt:\n");
|
||||
appendStringInfoString(es->str, "PlannedStmt:\n");
|
||||
es->indent++;
|
||||
}
|
||||
|
||||
@ -329,19 +329,19 @@ overexplain_debug(PlannedStmt *plannedstmt, ExplainState *es)
|
||||
/* 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. */
|
||||
@ -763,7 +763,7 @@ overexplain_intlist(const char *qlabel, List *list, ExplainState *es)
|
||||
}
|
||||
else
|
||||
{
|
||||
appendStringInfo(&buf, " not an integer list");
|
||||
appendStringInfoString(&buf, " not an integer list");
|
||||
Assert(false);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user