Re: Strange interval arithmetic

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: Strange interval arithmetic
Дата
Msg-id 20051130221823.GA27181@winnie.fuhr.org
обсуждение исходный текст
Ответ на Re: Strange interval arithmetic  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы Re: Strange interval arithmetic  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Wed, Nov 30, 2005 at 07:06:42PM -0300, Alvaro Herrera wrote:
> Hmm, why not check both the return value _and_ errno:
> 
> val = strtol(field[i], &cp, 10);
> if (val == LONG_MAX && errno == ERANGE)
>     return DTERR_FIELD_OVERFLOW;

I usually check both in my own code but I noticed several places
where PostgreSQL doesn't, so I kept that style.  I'll check both
if that's preferred.

-- 
Michael Fuhr


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Strange interval arithmetic
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Strange interval arithmetic