Re: Change atoi to strtol in same place

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Change atoi to strtol in same place
Дата
Msg-id 20190724051521.xhdp4t26mmcuff5h@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: Change atoi to strtol in same place  (David Rowley <david.rowley@2ndquadrant.com>)
Список pgsql-hackers
On 2019-07-24 16:57:42 +1200, David Rowley wrote:
> On Wed, 24 Jul 2019 at 16:02, Joe Nelson <joe@begriffs.com> wrote:
> > > In general, I think it's a good idea to fix those places, but I wonder
> > > if we need to change the error messages too.
> >
> > I'll leave that decision for the community to debate. I did, however,
> > remove the newlines for the new error messages being passed to
> > pg_log_error().
> 
> I'd like to put my vote not to add this complex code to each option
> validation that requires an integer number. I'm not sure there
> currently is a home for it, but if there was, wouldn't it be better
> writing a function that takes a lower and upper bound and sets some
> output param with the value and returns a bool to indicate if it's
> within range or not?

+many



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: stress test for parallel workers
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Change atoi to strtol in same place