From: Justin Pryzby Date: Sat, 5 Dec 2020 22:43:12 -0600 Subject: [PATCH 07/17] pg_restore: "must be specified" and --list This was discussed here, but the idea got lost. https://www.postgresql.org/message-id/flat/20190612170201.GA11881%40alvherre.pgsql#2984347ab074e6f198bd294fa41884df Note that -d and -f are exclusive. Perhaps we should also reject -d and -l ? --- src/bin/pg_dump/pg_restore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/pg_dump/pg_restore.c b/src/bin/pg_dump/pg_restore.c index 589b4aed53..742e4140eb 100644 --- a/src/bin/pg_dump/pg_restore.c +++ b/src/bin/pg_dump/pg_restore.c @@ -305,7 +305,7 @@ main(int argc, char **argv) /* Complain if neither -f nor -d was specified (except if dumping TOC) */ if (!opts->cparams.dbname && !opts->filename && !opts->tocSummary) { - pg_log_error("one of -d/--dbname and -f/--file must be specified"); + pg_log_error("one of -d/--dbname, -f/--file or -l/--list must be specified"); exit_nicely(1); } -- 2.17.0 --PVZB3C997XEKXh6G Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0008-pg_dump-fix-pre-existing-docs-comments.patch"