Re: Re: [GENERAL] random() function produces wrong range

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Re: [GENERAL] random() function produces wrong range
Дата
Msg-id 15268.965527521@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Re: [GENERAL] random() function produces wrong range  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> rand() and RAND_MAX are defined by ANSI C, random() is a BSD-ism. I
> suggest you use the former.

Unfortunately, except on a few platforms like Linux, the typical
rand() implementation is vastly inferior to the typical random()
implementation.  BSD wouldn't have bothered to roll their own if
the older code hadn't been so godawful.  But unless you are using
glibc, you probably have a bug-compatible rand().
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: LIKE/ESCAPE implementation
Следующее
От: Tom Lane
Дата:
Сообщение: Re: COALESCE implementation question