mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
Replace appendPQExpBuffer(..., <constant>) with appendPQExpBufferStr
Arguably makes the code a bit more readable, and might give a small performance gain. David Rowley
This commit is contained in:
@ -195,7 +195,7 @@ main(int argc, char *argv[])
|
||||
if (lc_ctype)
|
||||
appendPQExpBuffer(&sql, " LC_CTYPE '%s'", lc_ctype);
|
||||
|
||||
appendPQExpBuffer(&sql, ";\n");
|
||||
appendPQExpBufferStr(&sql, ";\n");
|
||||
|
||||
/* No point in trying to use postgres db when creating postgres db. */
|
||||
if (maintenance_db == NULL && strcmp(dbname, "postgres") == 0)
|
||||
@ -222,7 +222,7 @@ main(int argc, char *argv[])
|
||||
{
|
||||
printfPQExpBuffer(&sql, "COMMENT ON DATABASE %s IS ", fmtId(dbname));
|
||||
appendStringLiteralConn(&sql, comment, conn);
|
||||
appendPQExpBuffer(&sql, ";\n");
|
||||
appendPQExpBufferStr(&sql, ";\n");
|
||||
|
||||
if (echo)
|
||||
printf("%s", sql.data);
|
||||
|
Reference in New Issue
Block a user