mirror of
https://github.com/postgres/postgres.git
synced 2025-06-11 20:28:21 +03:00
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
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user