diff --git a/src/bin/pg_dump/pg_restore.c b/src/bin/pg_dump/pg_restore.c index 49d799b953007..f0f75d7c25b08 100644 --- a/src/bin/pg_dump/pg_restore.c +++ b/src/bin/pg_dump/pg_restore.c @@ -300,7 +300,7 @@ main(int argc, char **argv) } /* Should get at most one of -d and -f, else user is confused */ - if (opts->dbname) + if (opts->dbname || getenv("PGSERVICE")) { if (opts->filename) {