| From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
|---|---|
| To: | David Rowley <dgrowleyml(at)gmail(dot)com> |
| Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, Gavin LYU <gavin790417(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: [PATCH] remove incorrect comment in pg_resetwal.c |
| Date: | 2026-01-16 15:51:49 |
| Message-ID: | CAHGQGwF6j-vowOcQq0LinEsRrYXnHV2+fhcnMtZ1V6J9MO-TdA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Fri, Jan 16, 2026 at 7:10 PM David Rowley <dgrowleyml(at)gmail(dot)com> wrote:
>
> On Fri, 16 Jan 2026 at 19:53, Michael Paquier <michael(at)paquier(dot)xyz> wrote:
> >
> > On Fri, Jan 16, 2026 at 02:45:42PM +0800, Gavin LYU wrote:
> > > In the block handling the -e option, there’s a comment that appears to be a
> > > copy-paste error (line 190 and 191). It references a second %s, but none
> > > exists in that format string. Moreover, similar argument-handling code for
> > > other options doesn’t include such a comment.
> > >
> > > I believe it should be removed.
> >
> > I disagree. This note still looks helpful to me when it comes to
> > translation even if it is incorrect: the %s markup refers to an option
> > switch.
>
> I think fixing it rather than removing it is the way to go. cc8d41511
> removed the first va arg and didn't update the comment.
>
> git diff cc8d41511~1..cc8d41511 -- */pg_resetwal.c | grep translator -C 3
> @@ -156,13 +157,13 @@ main(int argc, char *argv[])
> {
> /*------
> translator: the second %s is
> a command line argument (-e, etc) */
> - fprintf(stderr, _("%s: invalid
> argument for option %s\n"), progname, "-e");
> + pg_log_error("invalid argument
> for option %s", "-e");
> fprintf(stderr, _("Try \"%s
> --help\" for more information.\n"), progname);
>
> We should delete "the second"
+1
Commit cc8d41511 made a similar change in pg_receivewal.c, as follows.
This should be fixed as well.
/* translator: second %s is an option name */
- fprintf(stderr, _("%s: %s needs a slot to be specified using
--slot\n"), progname,
+ pg_log_error("%s needs a slot to be specified using --slot",
Regards,
--
Fujii Masao
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Matheus Alcantara | 2026-01-16 16:07:25 | Re: support ALTER COLUMN SET EXPRESSION over virtual generated column with check constraint |
| Previous Message | Robert Haas | 2026-01-16 15:49:09 | Re: code contributions for 2025, WIP version |