aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2014-03-05 18:15:19 -0500
committerBruce Momjian <bruce@momjian.us>2014-03-05 18:15:49 -0500
commitb44fc39fcecf58c1c93a322d71be2faee525853f (patch)
treeb1ef3c5bfe43f3d28a89d288926d82bf370c4288
parentf1ba94bcd9717b94b36868d6905547e313f3a359 (diff)
downloadpostgresql-b44fc39fcecf58c1c93a322d71be2faee525853f.tar.gz
postgresql-b44fc39fcecf58c1c93a322d71be2faee525853f.zip
pg_dump: make argument combination error exit code consistent
Per report from Pavel Golub
-rw-r--r--src/bin/pg_dump/pg_dump.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index f5a6bbb723e..17bb846165f 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -563,10 +563,16 @@ main(int argc, char **argv)
dump_inserts = 1;
if (dataOnly && schemaOnly)
- exit_horribly(NULL, "options -s/--schema-only and -a/--data-only cannot be used together\n");
+ {
+ write_msg(NULL, "options -s/--schema-only and -a/--data-only cannot be used together\n");
+ exit_nicely(1);
+ }
if (dataOnly && outputClean)
- exit_horribly(NULL, "options -c/--clean and -a/--data-only cannot be used together\n");
+ {
+ write_msg(NULL, "options -c/--clean and -a/--data-only cannot be used together\n");
+ exit_nicely(1);
+ }
if (dump_inserts && oids)
{