On Thu, Mar 9, 2023 at 11:25 AM Nathan Bossart <nathandboss...@gmail.com> wrote:
>
> +                               pg_log_error("Watch period must be 
> non-negative number, but argument is '%s'", opt);
>
> After looking around at the other error messages in this file, I think we
> should make this more concise.  Maybe something like
>
>         pg_log_error("\\watch: invalid delay interval: %s", opt);
In the review above Kyotaro-san suggested that message should contain
information on what it expects... So, maybe then
pg_log_error("\\watch interval must be non-negative number, but
argument is '%s'", opt); ?
Or perhaps with articles? pg_log_error("\\watch interval must be a
non-negative number, but the argument is '%s'", opt);

>
> +                               free(opt);
> +                               resetPQExpBuffer(query_buf);
> +                               return PSQL_CMD_ERROR;
>
> Is this missing psql_scan_reset(scan_state)?
Yes, fixed.

Best regards, Andrey Borodin.

Attachment: v5-0002-Add-iteration-count-argument-to-psql-watch-comman.patch
Description: Binary data

Attachment: v5-0001-Fix-incorrect-argument-handling-in-psql-watch.patch
Description: Binary data

Reply via email to