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

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Srinath Reddy <srinath2133(at)gmail(dot)com>, 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-23 20:12:22
Message-ID: 447c2cf1-9b93-4869-95a4-78efee23f3fb@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 2025-01-23 Th 3:18 AM, Srinath Reddy wrote:
> Hi,
>
> in pg_restore archive format option is parsed using only the first
> character of the value but in pg_dump the archive format option's
> value is compared with whole string using pg_strcasecmp is there any
> specific reason?
>
>

`git blame` tells me that this switch statement goes back to 2001.
Seeking a reason at this distance is unlikely to be productive. Probably
we were not nearly as careful then as we are now about such things. Feel
free to submit a patch tightening the test.

cheers

andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2025-01-23 20:15:53 Re: Extended Statistics set/restore/clear functions.
Previous Message Tom Lane 2025-01-23 20:10:16 Re: Orphaned users in PG16 and above can only be managed by Superusers