Re: (trivial patch) remove superfluous semicolons from pg_dump

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Ian Lawrence Barwick <barwick(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: (trivial patch) remove superfluous semicolons from pg_dump
Date: 2013-07-31 15:37:27
Message-ID: 20130731153727.GB3716@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


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(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2013-07-31 15:41:16 Re: Review: UNNEST (and other functions) WITH ORDINALITY
Previous Message Fujii Masao 2013-07-31 14:31:38 Re: [9.3 bug] disk space in pg_xlog increases during archive recovery