diff options
author | Robert Haas <rhaas@postgresql.org> | 2013-10-31 10:55:59 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2013-10-31 10:55:59 -0400 |
commit | cacbdd78106526d7c4f11f90b538f96ba8696fb0 (patch) | |
tree | 68b44c07247b99a1b316c01f66ecf0f8d6e96127 /contrib/postgres_fdw | |
parent | 343bb134ea20d3b7286c620c15a067da79cab724 (diff) | |
download | postgresql-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')
-rw-r--r-- | contrib/postgres_fdw/deparse.c | 10 | ||||
-rw-r--r-- | contrib/postgres_fdw/postgres_fdw.c | 6 |
2 files changed, 8 insertions, 8 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); } } diff --git a/contrib/postgres_fdw/postgres_fdw.c b/contrib/postgres_fdw/postgres_fdw.c index 8713eabc646..246a3a985b7 100644 --- a/contrib/postgres_fdw/postgres_fdw.c +++ b/contrib/postgres_fdw/postgres_fdw.c @@ -787,7 +787,7 @@ postgresGetForeignPlan(PlannerInfo *root, root->parse->commandType == CMD_DELETE)) { /* Relation is UPDATE/DELETE target, so use FOR UPDATE */ - appendStringInfo(&sql, " FOR UPDATE"); + appendStringInfoString(&sql, " FOR UPDATE"); } else { @@ -808,11 +808,11 @@ postgresGetForeignPlan(PlannerInfo *root, { case LCS_FORKEYSHARE: case LCS_FORSHARE: - appendStringInfo(&sql, " FOR SHARE"); + appendStringInfoString(&sql, " FOR SHARE"); break; case LCS_FORNOKEYUPDATE: case LCS_FORUPDATE: - appendStringInfo(&sql, " FOR UPDATE"); + appendStringInfoString(&sql, " FOR UPDATE"); break; } } |