Re: pg_restore --format= option(without any value) should report an error as pg_dump is reporting an error

Поиск
Список
Период
Сортировка
От Nathan Bossart
Тема Re: pg_restore --format= option(without any value) should report an error as pg_dump is reporting an error
Дата
Msg-id abhbSpewJZz0H999@nathan
обсуждение исходный текст
Ответ на Re: pg_restore --format= option(without any value) should report an error as pg_dump is reporting an error  (Mahendra Singh Thalor <mahi6run@gmail.com>)
Ответы Re: pg_restore --format= option(without any value) should report an error as pg_dump is reporting an error
Список pgsql-hackers
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



В списке pgsql-hackers по дате отправления: