git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f1ba94b)
pg_dump: make argument combination error exit code consistent
Wed, 5 Mar 2014 23:15:19 +0000 (18:15 -0500)
Wed, 5 Mar 2014 23:15:49 +0000 (18:15 -0500)
Per report from Pavel Golub


diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index f5a6bbb723e1f3185a2644a24c65d3c34417bcd8..17bb846165fa8c43066ca2eefc2a7e587a9f7442 100644 (file)
--- 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)
{
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /