OSDN Git Service

Fix pg_restore to complain if any arguments remain after parsing the switches
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 13 Aug 2010 14:38:04 +0000 (14:38 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 13 Aug 2010 14:38:04 +0000 (14:38 +0000)
commite4155c8483084e2a8d5779002e3b07854c85baf8
tree7a5d3d589df1a1b298f8c7edb413fc18117d6b51
parent9b0a86861a5d5cfe35fe8c876289402891022d4a
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.
src/bin/pg_dump/pg_dump.c
src/bin/pg_dump/pg_dumpall.c
src/bin/pg_dump/pg_restore.c