pg_upgrade: Fix exec_prog API to be less flaky
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Mon, 27 Aug 2012 18:21:09 +0000 (14:21 -0400)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Mon, 27 Aug 2012 18:29:14 +0000 (14:29 -0400)
commit088c065ce8e405fafbfa966937184ece9defcf20
tree12d903a88d91f84c1ddb85d5d88a549f42405fa2
parent34c02044ed7e7defde5a853b26dcd806c872d974
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.
contrib/pg_upgrade/check.c
contrib/pg_upgrade/dump.c
contrib/pg_upgrade/exec.c
contrib/pg_upgrade/pg_upgrade.c
contrib/pg_upgrade/pg_upgrade.h
contrib/pg_upgrade/server.c