> On 4 Nov 2024, at 14:55, Kirill Reshke <reshkekir...@gmail.com> wrote:

> I'm mostly fine with this patch,

Thanks for review!

> but maybe we need to handle `errno ==
> ERANGE` inside ParseVariableDouble and provide a better error msg in
> this case?
> Something like:
> ```
> reshke=# \set WATCH_INTERVAL -1e-309
> underflow while parsing parameter
> ```

Fair point, I've added ERANGE handling in the attached v3.

> Also, maybe we should provide `double max` arg to the
> ParseVariableDouble function, because this is a general-use function?

It's general use, but not generally used.  Since it's not an exposed API it
seems premature to add handling of a max value when there is no need, once
there is a caller (if one ever comes) that needs it we can deal with it at that
point.

--
Daniel Gustafsson

Attachment: v3-0001-Make-default-watch-interval-configurable.patch
Description: Binary data

Reply via email to