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


Reply via email to