From: Andrew Dunstan Date: Sun, 15 Mar 2026 16:09:36 +0000 (-0400) Subject: pg_restore: Remove dead code in restore_all_databases() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a793677e57bc27c674cb94b230164b2c28f4cbae;p=thirdparty%2Fpostgresql.git pg_restore: Remove dead code in restore_all_databases() Cleanup from commit 763aaa06f03. Author: Mahendra Singh Thalor Discussion: https://postgr.es/m/CAKYtNAqN49Hqd4v0wWH3uW6d6QsH+8e8bR_MVf4CboTZSzd+Aw@mail.gmail.com --- diff --git a/src/bin/pg_dump/pg_restore.c b/src/bin/pg_dump/pg_restore.c index fb44c0cfdfe..9b4b151b318 100644 --- a/src/bin/pg_dump/pg_restore.c +++ b/src/bin/pg_dump/pg_restore.c @@ -1268,16 +1268,6 @@ restore_all_databases(const char *inputFileSpec, */ memcpy(tmpopts, original_opts, sizeof(RestoreOptions)); - /* - * We need to reset override_dbname so that objects can be restored - * into an already created database. (used with -d/--dbname option) - */ - if (tmpopts->cparams.override_dbname) - { - pfree(tmpopts->cparams.override_dbname); - tmpopts->cparams.override_dbname = NULL; - } - snprintf(subdirdbpath, MAXPGPATH, "%s/databases", inputFileSpec); /*