At Tue, 14 Mar 2023 11:36:17 +0900, Michael Paquier <mich...@paquier.xyz> wrote 
in 
> Ok, thanks for looking.  Let's wait a bit and see if others have an
> opinion to offer.  At least, the CI is green.

+                               if (*opt_end)
+                                       pg_log_error("\\watch: incorrect 
interval value '%s'", opt);
+                               else if (errno == ERANGE)
+                                       pg_log_error("\\watch: out-of-range 
interval value '%s'", opt);
+                               else
+                                       pg_log_error("\\watch: interval value 
'%s' less than zero", opt);

I'm not sure if we need error messages for that resolution and I'm a
bit happier to have fewer messages to translate:p. Merging the cases
of ERANGE and negative values might be better. And I think we usually
refer to unparsable input as "invalid".

        if (*opt_end)
           pg_log_error("\\watch: invalid interval value '%s'", opt);
        else
           pg_log_error("\\watch: interval value '%s' out of range", opt);


It looks good other than that.

By the way, I noticed that \watch erases the query buffer. That
behavior differs from other commands, such as \g. And the difference
is not documented. Why do we erase the query buffer only in the case
of \watch?

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center


Reply via email to