Re: Random strings

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Random strings
Дата
Msg-id Pine.LNX.4.30.0108082119310.692-100000@peter.localdomain
обсуждение исходный текст
Ответ на Random strings  ("Joe Conway" <joseph.conway@home.com>)
Список pgsql-patches
Joe Conway writes:

> Per the discussion yesterday, here's a patch. There are two versions of
> essentially the same function. They both take an int as the number of
> requested random bytes, and generate a random binary string of the requested
> length from /dev/urandom. The first one (randomstr_hex) converts the binary
> to hex and returns it as text, and the other (randomstr_bytea) does the
> needed escaping of special characters and returns bytea.

Perhaps one of these returning bytea would be enough and you can use
the new encode functions to convert them to a format of choice.  Also, why
aren't you using /dev/random?

--
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter


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

Предыдущее
От: "Joe Conway"
Дата:
Сообщение: Random strings
Следующее
От: Anders Bengtsson
Дата:
Сообщение: JDBC Statement cleanup patch