aboutsummaryrefslogtreecommitdiff
path: root/contrib/postgres_fdw/deparse.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2013-10-31 10:55:59 -0400
committerRobert Haas <rhaas@postgresql.org>2013-10-31 10:55:59 -0400
commitcacbdd78106526d7c4f11f90b538f96ba8696fb0 (patch)
tree68b44c07247b99a1b316c01f66ecf0f8d6e96127 /contrib/postgres_fdw/deparse.c
parent343bb134ea20d3b7286c620c15a067da79cab724 (diff)
downloadpostgresql-cacbdd78106526d7c4f11f90b538f96ba8696fb0.tar.gz
postgresql-cacbdd78106526d7c4f11f90b538f96ba8696fb0.zip
Use appendStringInfoString instead of appendStringInfo where possible.
This shaves a few cycles, and generally seems like good programming practice. David Rowley
Diffstat (limited to 'contrib/postgres_fdw/deparse.c')
-rw-r--r--contrib/postgres_fdw/deparse.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/postgres_fdw/deparse.c b/contrib/postgres_fdw/deparse.c
index a03eec3c828..a2675eb8362 100644
--- a/contrib/postgres_fdw/deparse.c
+++ b/contrib/postgres_fdw/deparse.c
@@ -841,7 +841,7 @@ deparseInsertSql(StringInfo buf, PlannerInfo *root,
if (targetAttrs)
{
- appendStringInfoString(buf, "(");
+ appendStringInfoChar(buf, '(');
first = true;
foreach(lc, targetAttrs)
@@ -869,7 +869,7 @@ deparseInsertSql(StringInfo buf, PlannerInfo *root,
pindex++;
}
- appendStringInfoString(buf, ")");
+ appendStringInfoChar(buf, ')');
}
else
appendStringInfoString(buf, " DEFAULT VALUES");
@@ -989,7 +989,7 @@ deparseAnalyzeSizeSql(StringInfo buf, Relation rel)
initStringInfo(&relname);
deparseRelation(&relname, rel);
- appendStringInfo(buf, "SELECT pg_catalog.pg_relation_size(");
+ appendStringInfoString(buf, "SELECT pg_catalog.pg_relation_size(");
deparseStringLiteral(buf, relname.data);
appendStringInfo(buf, "::pg_catalog.regclass) / %d", BLCKSZ);
}
@@ -1302,7 +1302,7 @@ deparseConst(Const *node, deparse_expr_cxt *context)
if (node->constisnull)
{
- appendStringInfo(buf, "NULL");
+ appendStringInfoString(buf, "NULL");
appendStringInfo(buf, "::%s",
format_type_with_typemod(node->consttype,
node->consttypmod));
@@ -1650,7 +1650,7 @@ deparseOperatorName(StringInfo buf, Form_pg_operator opform)
else
{
/* Just print operator name. */
- appendStringInfo(buf, "%s", opname);
+ appendStringInfoString(buf, opname);
}
}