From 8abc13a88938ef473b8a486186f1b96630450728 Mon Sep 17 00:00:00 2001 From: David Rowley Date: Thu, 4 Jul 2019 13:01:13 +1200 Subject: Use appendStringInfoString and appendPQExpBufferStr where possible This changes various places where appendPQExpBuffer was used in places where it was possible to use appendPQExpBufferStr, and likewise for appendStringInfo and appendStringInfoString. This is really just a stylistic improvement, but there are also small performance gains to be had from doing this. Discussion: http://postgr.es/m/CAKJS1f9P=M-3ULmPvr8iCno8yvfDViHibJjpriHU8+SXUgeZ=w@mail.gmail.com --- contrib/postgres_fdw/deparse.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'contrib/postgres_fdw') diff --git a/contrib/postgres_fdw/deparse.c b/contrib/postgres_fdw/deparse.c index 6da4c834bf8..b951b11592e 100644 --- a/contrib/postgres_fdw/deparse.c +++ b/contrib/postgres_fdw/deparse.c @@ -1531,7 +1531,7 @@ deparseFromExprForRel(StringInfo buf, PlannerInfo *root, RelOptInfo *foreignrel, { Assert(fpinfo->jointype == JOIN_INNER); Assert(fpinfo->joinclauses == NIL); - appendStringInfo(buf, "%s", join_sql_o.data); + appendStringInfoString(buf, join_sql_o.data); return; } } @@ -1552,7 +1552,7 @@ deparseFromExprForRel(StringInfo buf, PlannerInfo *root, RelOptInfo *foreignrel, { Assert(fpinfo->jointype == JOIN_INNER); Assert(fpinfo->joinclauses == NIL); - appendStringInfo(buf, "%s", join_sql_i.data); + appendStringInfoString(buf, join_sql_i.data); return; } } @@ -1861,7 +1861,7 @@ deparseDirectUpdateSql(StringInfo buf, PlannerInfo *root, { List *ignore_conds = NIL; - appendStringInfo(buf, " FROM "); + appendStringInfoString(buf, " FROM "); deparseFromExprForRel(buf, root, foreignrel, true, rtindex, &ignore_conds, params_list); remote_conds = list_concat(remote_conds, ignore_conds); @@ -1944,7 +1944,7 @@ deparseDirectDeleteSql(StringInfo buf, PlannerInfo *root, { List *ignore_conds = NIL; - appendStringInfo(buf, " USING "); + appendStringInfoString(buf, " USING "); deparseFromExprForRel(buf, root, foreignrel, true, rtindex, &ignore_conds, params_list); remote_conds = list_concat(remote_conds, ignore_conds); -- cgit v1.2.3