pg_basebackup and error messages dependent on the order of the arguments

From: "Daniel Westermann (DWE)" <daniel(dot)westermann(at)dbi-services(dot)com>
To: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: pg_basebackup and error messages dependent on the order of the arguments
Date: 2024-09-30 11:10:09
Message-ID: GV0P278MB0419B8F0577DDAE48AF0CB5AD2762@GV0P278MB0419.CHEP278.PROD.OUTLOOK.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

shouldn't this give the same error message?

$ pg_basebackup --checkpoint=fast --format=t --compress --pgdata=/var/tmp/dummy
pg_basebackup: error: must specify output directory or backup target
pg_basebackup: hint: Try "pg_basebackup --help" for more information.

$ pg_basebackup --pgdata=/var/tmp/dummy --checkpoint=fast --format=t --compress
pg_basebackup: option '--compress' requires an argument
pg_basebackup: hint: Try "pg_basebackup --help" for more information.

I don't see why the first case gives not the same message as the second, especially as the "output directory" is specified.

Tested on v17 and devel, but I guess it was always like this.

Regards
Daniel

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2024-09-30 11:11:23 Re: msys inet_pton strangeness
Previous Message Tatsuo Ishii 2024-09-30 11:07:31 Re: Doc: typo in config.sgml