Fix pg_restore to complain if any arguments remain after parsing the switches
Tom Lane <tgl@sss.pgh.pa.us>
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
| Path | Change | +/− |
|---|---|---|
| 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 |