Re: psql \watch 2nd argument: iteration count

From: Andrey Borodin <amborodin86(at)gmail(dot)com>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, sfrost(at)snowman(dot)net, peter(dot)eisentraut(at)enterprisedb(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: psql \watch 2nd argument: iteration count
Date: 2023-03-12 20:05:39
Message-ID: CAAhFRxgtp-7wqCxjK8Hh8wUTrXFVykfdoyNfWgAe89B1MDcmTw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Mar 9, 2023 at 11:25 AM Nathan Bossart <nathandbossart(at)gmail(dot)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 Content-Type Size
v5-0002-Add-iteration-count-argument-to-psql-watch-comman.patch application/octet-stream 6.4 KB
v5-0001-Fix-incorrect-argument-handling-in-psql-watch.patch application/octet-stream 1.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2023-03-12 20:09:57 Re: Progress report of CREATE INDEX for nested partitioned tables
Previous Message Tom Lane 2023-03-12 20:02:43 Re: pg_dump versus hash partitioning