aboutsummaryrefslogtreecommitdiff
path: root/src/bin/scripts/createdb.c
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2013-11-18 18:29:01 +0200
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2013-11-18 18:34:51 +0200
commit32ceba3ea730b6b1bd3eca786f72d61945ad42b7 (patch)
tree4370209d2561aeff498b30303ead012e162f2cd9 /src/bin/scripts/createdb.c
parentf1df4731eea6bc05e0769e9cc789e7304722efe4 (diff)
downloadpostgresql-32ceba3ea730b6b1bd3eca786f72d61945ad42b7.tar.gz
postgresql-32ceba3ea730b6b1bd3eca786f72d61945ad42b7.zip
Replace appendPQExpBuffer(..., <constant>) with appendPQExpBufferStr
Arguably makes the code a bit more readable, and might give a small performance gain. David Rowley
Diffstat (limited to 'src/bin/scripts/createdb.c')
-rw-r--r--src/bin/scripts/createdb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/scripts/createdb.c b/src/bin/scripts/createdb.c
index 5b28f18a81a..14cd1284906 100644
--- a/src/bin/scripts/createdb.c
+++ b/src/bin/scripts/createdb.c
@@ -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);