Skip site navigation (1) Skip section navigation (2)

pgsql: pg_upgrade: Fix exec_prog API to be less flaky

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: pg_upgrade: Fix exec_prog API to be less flaky
Date: 2012-08-27 18:31:21
Message-ID: E1T645p-0000LJ-4y@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
pg_upgrade: Fix exec_prog API to be less flaky

The previous signature made it very easy to pass something other than
the printf-format specifier in the corresponding position, without any
warning from the compiler.

While at it, move some of the escaping, redirecting and quoting
responsibilities from the callers into exec_prog() itself.  This makes
the callsites cleaner.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/088c065ce8e405fafbfa966937184ece9defcf20

Modified Files
--------------
contrib/pg_upgrade/check.c      |    9 +---
contrib/pg_upgrade/dump.c       |    9 ++--
contrib/pg_upgrade/exec.c       |   80 ++++++++++++++++++++------------------
contrib/pg_upgrade/pg_upgrade.c |   68 +++++++++++++--------------------
contrib/pg_upgrade/pg_upgrade.h |    9 ++--
contrib/pg_upgrade/server.c     |   34 ++++++++---------
6 files changed, 96 insertions(+), 113 deletions(-)

pgsql-committers by date

Next:From: Robert HaasDate: 2012-08-27 19:01:28
Subject: pgsql: Back-patch fixes for some issues in our Windows socket codeinto
Previous:From: Tom LaneDate: 2012-08-27 16:46:05
Subject: pgsql: Fix DROP INDEX CONCURRENTLY IF EXISTS.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group