pg_upgrade: Fix exec_prog API to be less flaky

Alvaro Herrera <alvherre@alvh.no-ip.org>

Commit: 088c065ce8e405fafbfa966937184ece9defcf20
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: 2012-08-27T18:29:14Z
Releases: 9.3.0
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.

Files

PathChange+/−
contrib/pg_upgrade/check.c modified +3 −6
contrib/pg_upgrade/dump.c modified +4 −5
contrib/pg_upgrade/exec.c modified +42 −38
contrib/pg_upgrade/pg_upgrade.c modified +26 −42
contrib/pg_upgrade/pg_upgrade.h modified +5 −4
contrib/pg_upgrade/server.c modified +16 −18