Re: why -Fdance archive format option works with ./pg_restore but not with ./pg_dump?

From: Srinath Reddy <srinath2133(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: why -Fdance archive format option works with ./pg_restore but not with ./pg_dump?
Date: 2025-01-25 13:12:06
Message-ID: CAFC+b6pJt2TSJ5gLihcvAZmoO8XTTTRd2AAR+acuyLWu-jgznA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

./pg_dump postgres -Fp -f textdump

./pg_restore -Fp -d postgres textdump
pg_restore: error: unrecognized archive format "p"; please specify "c",
"d", or "t"

./pg_restore -d postgres textdump
pg_restore: error: input file appears to be a text format dump. Please use
psql.

wouldn't it be nice if we get the error message as same as when we didn't
gave format option and pg_restore finds the format
using _discoverArchiveFormat there it suggests to try psql ,instead of
saying "p/plain text" format is a invalid format,as we are doing currently
in pg.

thoughts?

Regards,
Srinath Reddy Sadipiralla,
EDB:http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2025-01-25 13:23:00 Re: XMLDocument (SQL/XML X030)
Previous Message Srinath Reddy 2025-01-25 12:42:44 Re: why -Fdance archive format option works with ./pg_restore but not with ./pg_dump?