Fix pg_restore to complain if any arguments remain after parsing the switches

Tom Lane <tgl@sss.pgh.pa.us>

Commit: e507a3ee7b47185a8f8fe28dc22c0ed94d5b218f
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2010-08-13T14:38:12Z
Releases: 9.0.0
Fix pg_restore to complain if any arguments remain after parsing the switches
and input file name, per bug #5617 from Leo Shklovskii.  Rearrange the
corresponding code in pg_dump and pg_dumpall so that all three programs
handle this in a consistent, straightforward fashion.

Back-patch to 9.0, but no further.  Although this is certainly a bug, it's
possible that people have scripts that will be broken by the added error
check, so it seems better not to change the behavior in stable branches.

Files

PathChange+/−
src/bin/pg_dump/pg_dumpall.c modified +18 −17
src/bin/pg_dump/pg_dump.c modified +8 −7
src/bin/pg_dump/pg_restore.c modified +13 −2