(trivial patch) remove superfluous semicolons from pg_dump

Started by Ian Lawrence Barwickalmost 13 years ago2 messageshackers
Jump to latest
#1Ian Lawrence Barwick
barwick@gmail.com

I noticed an instance of 'appendPQExpBuffer(query, ";");' in pg_dump.c which
seems pointless and mildly confusing. There's another seemingly
useless one in pg_dumpall.c. Attached patch removes both (if that
makes any sense).

Regards

Ian Barwick

Attachments:

pg_dump-cull-semicolons.patchapplication/octet-stream; name=pg_dump-cull-semicolons.patchDownload+0-3
#2Bruce Momjian
bruce@momjian.us
In reply to: Ian Lawrence Barwick (#1)
Re: (trivial patch) remove superfluous semicolons from pg_dump

Applied.

---------------------------------------------------------------------------

On Thu, Jul 4, 2013 at 12:12:11AM +0900, Ian Lawrence Barwick wrote:

I noticed an instance of 'appendPQExpBuffer(query, ";");' in pg_dump.c which
seems pointless and mildly confusing. There's another seemingly
useless one in pg_dumpall.c. Attached patch removes both (if that
makes any sense).

Regards

Ian Barwick

diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 9ee9ea2..3d43b3b 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -12751,7 +12751,6 @@ createViewAsClause(Archive *fout, TableInfo *tbinfo)
appendPQExpBuffer(query, "SELECT definition AS viewdef "
"FROM pg_views WHERE viewname = ");
appendStringLiteralAH(query, tbinfo->dobj.name, fout);
-		appendPQExpBuffer(query, ";");
}
res = ExecuteSqlQuery(fout, query->data, PGRES_TUPLES_OK);
diff --git a/src/bin/pg_dump/pg_dumpall.c b/src/bin/pg_dump/pg_dumpall.c
index 78f702f..283b3d9 100644
--- a/src/bin/pg_dump/pg_dumpall.c
+++ b/src/bin/pg_dump/pg_dumpall.c
@@ -1428,8 +1428,6 @@ dumpDatabaseConfig(PGconn *conn, const char *dbname)
if (server_version >= 90000)
appendPQExpBuffer(buf, ")");

- appendPQExpBuffer(buf, ";");
-
res = executeQuery(conn, buf->data);
if (PQntuples(res) == 1 &&
!PQgetisnull(res, 0, 0))

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers