Skip to content

Commit b44fc39

Browse files
committed
pg_dump: make argument combination error exit code consistent
Per report from Pavel Golub
1 parent f1ba94b commit b44fc39

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/bin/pg_dump/pg_dump.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -563,10 +563,16 @@ main(int argc, char **argv)
563563
dump_inserts = 1;
564564

565565
if (dataOnly && schemaOnly)
566-
exit_horribly(NULL, "options -s/--schema-only and -a/--data-only cannot be used together\n");
566+
{
567+
write_msg(NULL, "options -s/--schema-only and -a/--data-only cannot be used together\n");
568+
exit_nicely(1);
569+
}
567570

568571
if (dataOnly && outputClean)
569-
exit_horribly(NULL, "options -c/--clean and -a/--data-only cannot be used together\n");
572+
{
573+
write_msg(NULL, "options -c/--clean and -a/--data-only cannot be used together\n");
574+
exit_nicely(1);
575+
}
570576

571577
if (dump_inserts && oids)
572578
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy