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 --- src/fe_utils/string_utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/fe_utils/string_utils.c') diff --git a/src/fe_utils/string_utils.c b/src/fe_utils/string_utils.c index d5757becef2..8c3a603cf1d 100644 --- a/src/fe_utils/string_utils.c +++ b/src/fe_utils/string_utils.c @@ -624,10 +624,10 @@ appendPsqlMetaConnect(PQExpBuffer buf, const char *dbname) PQExpBufferData connstr; initPQExpBuffer(&connstr); - appendPQExpBuffer(&connstr, "dbname="); + appendPQExpBufferStr(&connstr, "dbname="); appendConnStrVal(&connstr, dbname); - appendPQExpBuffer(buf, "-reuse-previous=on "); + appendPQExpBufferStr(buf, "-reuse-previous=on "); /* * As long as the name does not contain a newline, SQL identifier -- cgit v1.2.3