| From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
|---|---|
| To: | Daniel Gustafsson <daniel(at)yesql(dot)se>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Nathan Bossart <nathandbossart(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Matthias Hörmann <matthias(dot)hoermann(at)saltation(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org |
| Subject: | Re: BUG #19042: Option --help not recognized at the end of command line in pg_restore |
| Date: | 2025-11-03 20:57:23 |
| Message-ID: | 60ff5987-fd3e-43df-8393-0995909faa4a@eisentraut.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
On 29.10.25 21:19, Daniel Gustafsson wrote:
>
>
>> On 29 Oct 2025, at 17:54, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>
>> Peter Eisentraut <peter(at)eisentraut(dot)org> writes:
>>>> On 25.10.25 00:26, Daniel Gustafsson wrote:
>>>> While hacking on this it seemed like a good idea to move to using progname
>>>> consistently, and reduce scope in some places from global variables, but
>>>> looking at it now I'm less convinced. At the very least it should be ripped
>>>> out into its own patch but for now those changes are left in there.
>>
>>> The --version outputs intentionally do not use progname, so that you get
>>> a proper identification of the program and version independent of what
>>> the binary might be called. Please don't change that.
>
> All callsites using handle_help_version_opts were already using progname for —version, this just made it consistent. That being said, I can change it to be consistent in the other direction.
AFAICT, handle_help_version_opts() does this correctly: It takes an
argument fixed_progname that is used for --version output, while for the
--help output it uses argv. And most callers provide a fixed string for
fixed_progname, but I see that some don't.
>> Hmm, that's important institutional knowledge that should be captured
>> somewhere.
>
> Maybe a README in src/bin?
Maybe just a better code comment at handle_help_version_opts().
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Paquier | 2025-11-04 04:52:09 | Re: BUG #19093: Behavioral change in walreceiver termination between PostgreSQL 14.17 and 14.18 |
| Previous Message | Sivadhas arumugam | 2025-11-03 19:47:05 | RE: CREATE TABLE ... LIKE INCLUDING ALL does not create new sequences for serial columns |