Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ss4kz-005tuw-Vv for pgsql-hackers@arkaria.postgresql.org; Sat, 21 Sep 2024 18:22:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1ss4kw-007pj9-V0 for pgsql-hackers@arkaria.postgresql.org; Sat, 21 Sep 2024 18:22:56 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ss4kw-007pj1-LC for pgsql-hackers@lists.postgresql.org; Sat, 21 Sep 2024 18:22:56 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ss4kv-000MTm-ER for pgsql-hackers@lists.postgresql.org; Sat, 21 Sep 2024 18:22:54 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 48LIMnSX2745563; Sat, 21 Sep 2024 14:22:49 -0400 From: Tom Lane To: Florents Tselai cc: pgsql-hackers Subject: Re: Docs pg_restore: Shouldn't there be a note about -n ? In-reply-to: References: <284C4D55-4F90-4AA0-84C8-1E6A28DDF271@gmail.com> Comments: In-reply-to Florents Tselai message dated "Sat, 21 Sep 2024 20:40:27 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <2745561.1726942969.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Sat, 21 Sep 2024 14:22:49 -0400 Message-ID: <2745562.1726942969@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Florents Tselai writes: > Ah, swapped them by mistake on the previous email: > They're both available in the pg_dump and note on -n missing in pg_restore. > The question remains though: > Shouldn’t there be a note about -n in pg_restore ? Probably. I see that pg_dump has a third copy of the exact same note for "-e". pg_restore lacks that switch for some reason, but this is surely looking mighty duplicative. I propose getting rid of the per-switch Notes and putting a para into the Notes section, along the lines of When -e, -n, or -t is specified, pg_dump makes no attempt to dump any other database objects that the selected object(s) might depend upon. Therefore, there is no guarantee that the results of a selective dump can be successfully restored by themselves into a clean database. and mutatis mutandis for pg_restore. regards, tom lane