Re: [HACKERS] Bug in to_timestamp().

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: [HACKERS] Bug in to_timestamp().
Дата
Msg-id CA+TgmoY2KAFz9H=kK0rh0ZYqVXXTOHACLbCHJV-eSwcNNn03Rg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Bug in to_timestamp().  (Dmitry Dolgov <9erthalion6@gmail.com>)
Ответы Re: [HACKERS] Bug in to_timestamp().
Список pgsql-hackers
On Wed, Jan 31, 2018 at 11:53 AM, Dmitry Dolgov <9erthalion6@gmail.com> wrote:
> Why not write `is_separator_char` using `isprint`, `isalpha`, `isdigit` from
> ctype.h? Something like:
>
>     return isprint(*str) && !isalpha(*str) && !isdigit(*str)
>
> From what I see in the source code they do exactly the same and tests are
> successfully passing with this change.

I'm not quite sure whether it's relevant here, but I think some of the
ctype.h functions have locale-dependent behavior.  By implementing our
own test we make sure that we don't accidentally inherit any such
behavior.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation()
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: Wait for parallel workers to attach