public inbox for [email protected]  
help / color / mirror / Atom feed
From: Nathan Bossart <[email protected]>
To: Mahendra Singh Thalor <[email protected]>
Cc: Andrew Dunstan <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: pg_restore --format= option(without any value) should report an error as pg_dump is reporting an error
Date: Mon, 16 Mar 2026 14:34:34 -0500
Message-ID: <abhbSpewJZz0H999@nathan> (raw)
In-Reply-To: <CAKYtNArQ-c8xfBaWOKBB6TPVM5Fd_d0v2UEpxk9f5BuKyrQYxQ@mail.gmail.com>
References: <CAKYtNApkh=Vy2DpNRCnEJmPpxNuksbAh_QBav=2fLmVjBhGwFw@mail.gmail.com>
	<CAKYtNApxyeeQbjxjFCgHwuv0T2TJvFaU6QSQaMU_yr1nP4Y8Fg@mail.gmail.com>
	<[email protected]>
	<CAKYtNArQ-c8xfBaWOKBB6TPVM5Fd_d0v2UEpxk9f5BuKyrQYxQ@mail.gmail.com>

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





view thread (9+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: pg_restore --format= option(without any value) should report an error as pg_dump is reporting an error
  In-Reply-To: <abhbSpewJZz0H999@nathan>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox