1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Micro-opt: replace calls like

appendStringInfo(buf, "%s", str);
with
    appendStringInfoString(buf, str);
as the latter form is slightly faster.
This commit is contained in:
Neil Conway
2004-01-31 05:09:41 +00:00
parent d4fd7d85f3
commit 7b2cf1713d
6 changed files with 31 additions and 33 deletions

View File

@ -10,7 +10,7 @@
* Written by Peter Eisentraut <peter_e@gmx.net>.
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.181 2004/01/26 22:35:32 tgl Exp $
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.182 2004/01/31 05:09:41 neilc Exp $
*
*--------------------------------------------------------------------
*/
@ -3259,7 +3259,7 @@ flatten_set_variable_args(const char *name, List *args)
break;
case T_Float:
/* represented as a string, so just copy it */
appendStringInfo(&buf, "%s", strVal(&arg->val));
appendStringInfoString(&buf, strVal(&arg->val));
break;
case T_String:
val = strVal(&arg->val);
@ -3293,9 +3293,9 @@ flatten_set_variable_args(const char *name, List *args)
* mode, quote it if it's not a vanilla identifier.
*/
if (flags & GUC_LIST_QUOTE)
appendStringInfo(&buf, "%s", quote_identifier(val));
appendStringInfoString(&buf, quote_identifier(val));
else
appendStringInfo(&buf, "%s", val);
appendStringInfoString(&buf, val);
}
break;
default: