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.98.2) (envelope-from ) id 1xRYdv-000000014up-1X7K for pgsql-bugs@arkaria.postgresql.org; Thu, 12 Nov 2026 17:31:23 +0000 Received: from localhost ([127.0.0.1]:47716 helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xRYds-0000000450q-15pm for pgsql-bugs@arkaria.postgresql.org; Thu, 12 Nov 2026 17:31:20 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]:38440) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xRB8E-0000000C5WT-1Xy8 for pgsql-bugs@lists.postgresql.org; Wed, 11 Nov 2026 16:25:06 +0000 Received: from mahout.postgresql.org ([2001:4800:3e1:1::227]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xRB8D-00000000Ovl-1PgQ for pgsql-bugs@lists.postgresql.org; Wed, 11 Nov 2026 16:25:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=postgresql.org; s=20171124; h=Message-ID:Date:Reply-To:Cc:From:To:Subject: Content-Transfer-Encoding:MIME-Version:Content-Type:Sender:Content-ID: Content-Description:In-Reply-To:References; bh=pB2rKkVV13m0pOu3MUFTxZwWYE+8vf1W/6rcNvUReS8=; b=y92tj1Vh1MCehOFhA6Q92taNhc b1pDrEh6IrNgDnyl0hN7K93hfIwn193i6qKMV0KLGbYiw6oMyN94YZCqKGLKrHRT0iZbZ/sLr67s/ /8V3XJwj+bvJVIek/88BXbzASF6BMp75TJGgTTMOyGl7lRFIp/dDvGh+Abb/qWlhS/hNdudcJ+VM5 uclnGJhS9b/L7MeVcC75V2Fc0ek6DkJqShMJxvhd/8IELhHg/sFcJxyAlgxZ/EWHQduuKZ/G1thRG ALUjxd2EAZyk0261h8hOp52SBhPmI8ghv0N0zsJz0R6kSsPYZlwGD3UyzNt/7+aZckRRrq/4qXkCe A98BGhnQ==; Received: from wrigleys.postgresql.org ([2a02:16a8:dc51::60]) by mahout.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xRB8C-000000016Ju-0a3B for pgsql-bugs@lists.postgresql.org; Wed, 11 Nov 2026 16:25:04 +0000 Received: from localhost ([127.0.0.1] helo=wrigleys.postgresql.org) by wrigleys.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xRB8B-00000002pCA-0cUu for pgsql-bugs@lists.postgresql.org; Wed, 11 Nov 2026 16:25:03 +0000 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #19891: pg_restore ignores an explicitly empty -F argument To: pgsql-bugs@lists.postgresql.org From: PG Bug reporting form Cc: imchifan@mail.com Reply-To: imchifan@mail.com, pgsql-bugs@lists.postgresql.org Date: Wed, 11 Nov 2026 16:24:27 +0000 Message-ID: <19891-0b151c9cd5969ede@postgresql.org> X-Auto-Response-Suppress: All Auto-Submitted: auto-generated List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk The following bug has been logged on the website: Bug reference: 19891 Logged by: Faye Email address: imchifan@mail.com PostgreSQL version: 18.6 Operating system: Linux/amd64 Description: =20 pg_restore treats an explicitly empty -F/--format argument as though the option were absent and proceeds with archive-format auto-detection. With empty input, I get an input-file error, while another invalid format is rejected during option validation. Because -F requires an archive format and accepts only c, d, or t, an explicitly supplied empty value should be rejected as an unrecognized archive format rather than enabling auto-detection. How to repeat: Run these commands with pg_restore on PATH: ``` pg_restore -f - -F ''