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.96) (envelope-from ) id 1w2Di6-00065W-25 for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Mar 2026 19:34:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w2Di2-00CPyG-21 for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Mar 2026 19:34:39 +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.96) (envelope-from ) id 1w2Di2-00CPy1-12 for pgsql-hackers@lists.postgresql.org; Mon, 16 Mar 2026 19:34:39 +0000 Received: from mail-ot1-x334.google.com ([2607:f8b0:4864:20::334]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w2Di0-000000003s5-03e6 for pgsql-hackers@lists.postgresql.org; Mon, 16 Mar 2026 19:34:38 +0000 Received: by mail-ot1-x334.google.com with SMTP id 46e09a7af769-7d4c12ff3d5so4305122a34.2 for ; Mon, 16 Mar 2026 12:34:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773689677; x=1774294477; darn=lists.postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=tKLDPvNNHX7gOhcwulu/KO/GxwFVXE+PVmEJlyx8nNc=; b=FqzgoRGv1ln9zuqTBflV2cyKWQOAz0lMemUqIkVMtv3BrN4++HwPRyv1i75kWWG61Y sbVWcP4+F2Ky4I00/4v6k6+Got7rK/y8tlJwrH3pkbekxVbrWaaqnO4jcc4uZB+Gqhb7 6NPEsf49YM8D/zIxbzbGpmwGNj/2rd15yZLdfVIQzBeBZln8KVElt/d/lenBkB/JVCsr UmklZ+DL7dbzG/LO8LgLROECNulgGgvWvGBCRt4ABo8Z3hCiph/DC7Ed1wjOPcBo9sfK KWINrUGNCOz4Bl6JoMy5srvUDHAhGWJZiUx7D8kT/04oIuL1HrUv2BVsi2SNqK+Yz3i2 z+vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773689677; x=1774294477; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tKLDPvNNHX7gOhcwulu/KO/GxwFVXE+PVmEJlyx8nNc=; b=ENZPTs25xd8/fWOZsu3GInBGTtdYGmzmaeJo2p7oA7/vtNm2t10Mb5qM3SszCp7rkY b3/XPlynYnRl/NpEhcuDwxngQ+LmUmk+I0frDSTiQdhJiiVMyKvQY3Dqxnf4K42zxn5U 1TKB7Hwwh6XuA6d1yk3gY7DK6W1/Hw4d8atFkkaZB25IrBWIryk1R9bHvZ5DBQwx+UZ7 jgCjZIaysRisTHzg82bM415+eQH4h8tyy0S6oHirYzrQgfbcM8RHyaGsfRgLCqHLL67R O09WMh1XqLekDW2Rb8jRdoFl1qzyUSBcEu6ApE/pa8sT8cacVIpCIyFtMfkQssb9/r6g O5Sw== X-Forwarded-Encrypted: i=1; AJvYcCXLrtD0hTE/dKaSUyxEzSgsohj1ST2J0qlKj5rm+roY4ocBNT1f1/422XZTSYy0G0nl10c/hdFIyTscwA50@lists.postgresql.org X-Gm-Message-State: AOJu0YxF5UWhYqS0F76XlYBXrlYD8oxeB3N4Az207nvfz0kD8WKt+veH iSh4zO3q/GBQxgXXhWfM/CUSMI2G2UgwiCrAzOonsEd4Azw5lPYoYhIE X-Gm-Gg: ATEYQzzOxUK3iEsZ+wwRiK1sFkFtqqgb+qEdhOctxdMN5nAlEvzkqbJwY9UTa1K+8Qq DASJ77Z5KN+CHI9NeTDBPgoNBuW34cQOXr1wmfsJIC5j++E27Wju/gU4Zig0579yAzeO9TBge2n +++f07PeXGrnlIQqcJURzNWaJqffjynALPyDz7+rLzhz58lnt43gTpcCpBiFnBiU+QldqMj9DwC bpY+x7gRqK836S1BUPEMKH1Q3jYir/p50jPdUvzhueAZRmjWjxmuzXd2niIPWhsp0vHOBPEmmXa azIQHyXX89poUkZBGvL7TUcydIyjpy98gCi4dsHCpliq1fhUpQ6xX+yav8cKJQy//5bPZWwBtaj itrG6To1B0zyskWJYAHF/wVJokyeqFTq/F3CWI5gv7GWAB1z32dHwj2N4dIFDHCDmlI7CtIG6B1 Lnx/svUGnBsV6biJCko1jP1jzvg8quHjMFTzWBlxr/y13wTLtK+n9sCfG1c8aAoxWkogYxUCheo J+7pCFntHnhOA7pr9aQmQ== X-Received: by 2002:a05:6830:82d2:b0:7d1:9217:94e with SMTP id 46e09a7af769-7d7825610ddmr9495573a34.26.1773689676966; Mon, 16 Mar 2026 12:34:36 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-7d76ac3230fsm12891851a34.4.2026.03.16.12.34.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Mar 2026 12:34:36 -0700 (PDT) Date: Mon, 16 Mar 2026 14:34:34 -0500 From: Nathan Bossart To: Mahendra Singh Thalor Cc: Andrew Dunstan , PostgreSQL Hackers Subject: Re: pg_restore --format= option(without any value) should report an error as pg_dump is reporting an error Message-ID: References: <1d66a1e5-ce44-448b-8407-31d5ed9bc10d@dunslane.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sun, Mar 15, 2026 at 10:32:11PM +0530, Mahendra Singh Thalor wrote: > Here, I am attaching an updated patch for the review. I removed the > length check for host, port and format in pg_restore as we don't have > check in pg_dump also. Looks generally reasonable to me. > I think we don't need any test cases for host and port. Why not? > If we want to backpatch, then I can make patches for back branches but > as of now, I am uploading a patch for master only. -1 for back-patching. --format seems to have been broken since pg_restore was first committed in 2000 (commit 500b62b057), so I don't sense any urgency here. Not to mention that someone might be relying on the current behavior. > +command_fails_like( > + [ 'pg_restore', '-f -', '-F', 'p' ], > + qr/\Qpg_restore: error: archive format "p" is not supported; please use psql\E/, > + 'pg_restore: unrecognized archive format p|plain'); How does this test relate to this change? -- nathan