Re: psql \watch 2nd argument: iteration count - Mailing list pgsql-hackers

From Andrey Borodin
Subject Re: psql \watch 2nd argument: iteration count
Date
Msg-id CAAhFRxgtp-7wqCxjK8Hh8wUTrXFVykfdoyNfWgAe89B1MDcmTw@mail.gmail.com
Whole thread Raw
In response to Re: psql \watch 2nd argument: iteration count  (Nathan Bossart <nathandbossart@gmail.com>)
Responses Re: psql \watch 2nd argument: iteration count  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
On Thu, Mar 9, 2023 at 11:25 AM Nathan Bossart <nathandbossart@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

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_dump versus hash partitioning
Next
From: Justin Pryzby
Date:
Subject: Re: Progress report of CREATE INDEX for nested partitioned tables