Thread
Commits
-
Remove incorrect entries in pg_walsummary's getopt_long call.
- 6596a8c8603d 17.1 landed
- 04c64e3fb35a 18.0 landed
-
pg_walsummary, Character-not-present-in-option
btsugieyuusuke <btsugieyuusuke@oss.nttdata.com> — 2024-09-30T06:02:03Z
Hi hackers, I found probably something to fix in pg_walsummary. pg_walsummary specifies “f:iqw:” as the third argument of getopt_long(). > /* process command-line options */ > while ((c = getopt_long(argc, argv, "f:iqw:", > long_options, &optindex)) != -1) However, only i and q are valid options. > switch (c) > { > case 'i': > break; > case 'q': > opt.quiet = true; > break; > default: > /* getopt_long already emitted a complaint */ > pg_log_error_hint("Try \"%s --help\" for more information.", > progname); > exit(1); > } Therefore, shouldn't “f:” and “w:” be removed? Best regards, Yusuke Sugie -
Re: pg_walsummary, Character-not-present-in-option
btsugieyuusuke <btsugieyuusuke@oss.nttdata.com> — 2024-09-30T10:40:30Z
I forgot to attach the patch file, so I'm attaching it in reply. 2024-09-30 15:02 に btsugieyuusuke さんは書きました: > Hi hackers, > I found probably something to fix in pg_walsummary. > > pg_walsummary specifies “f:iqw:” as the third argument of > getopt_long(). > >> /* process command-line options */ >> while ((c = getopt_long(argc, argv, "f:iqw:", >> long_options, &optindex)) != -1) > > However, only i and q are valid options. > >> switch (c) >> { >> case 'i': >> break; >> case 'q': >> opt.quiet = true; >> break; >> default: >> /* getopt_long already emitted a complaint */ >> pg_log_error_hint("Try \"%s --help\" for more information.", >> progname); >> exit(1); >> } > > Therefore, shouldn't “f:” and “w:” be removed? > > Best regards, > Yusuke Sugie -
Re: pg_walsummary, Character-not-present-in-option
Tom Lane <tgl@sss.pgh.pa.us> — 2024-09-30T16:08:11Z
btsugieyuusuke <btsugieyuusuke@oss.nttdata.com> writes: >> Therefore, shouldn't “f:” and “w:” be removed? Looks like that to me too. Pushed. regards, tom lane
-
Re: pg_walsummary, Character-not-present-in-option
Robert Haas <robertmhaas@gmail.com> — 2024-10-03T17:19:23Z
On Mon, Sep 30, 2024 at 12:08 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: > btsugieyuusuke <btsugieyuusuke@oss.nttdata.com> writes: > >> Therefore, shouldn't “f:” and “w:” be removed? > > Looks like that to me too. Pushed. Thanks to Yusuke-san for the report and patch and to Tom for the commit. I vaguely recall that early in the development of pg_walsummary I thought it was going to need more options than and then realized that some of them weren't necessary. Looks like I did a bad job removing the leftovers; thanks for cleaning it up. -- Robert Haas EDB: http://www.enterprisedb.com