Re: Generating random values.

Поиск
Список
Период
Сортировка
Искать
От
Joshua D. Drake
Тема
Re: Generating random values.
Дата
Msg-id
4303734C.8040105@commandprompt.com
Ответ на
Generating random values. (Fernando Lujan)
Список
Дерево обсуждения
Re: Generating random values. Edmund <ebacon-xlii@onesystem.com>
Re: Generating random values. Mike Nolan <nolan@gw.tssi.com>
Re: Generating random values. Chris Travers <chris@metatrontech.com>
Re: Generating random values. Mike Nolan <nolan@gw.tssi.com>
Re: Generating random values. Fernando Lujan <flujan@gmail.com>
Re: Generating random values. Bruno Wolff III <bruno@wolff.to>
Re: Generating random values. Chris Travers <chris@travelamericas.com>
Fernando Lujan wrote:
> Hi folks,
> 
> I have a table wich contains my users... I want to insert to each user
> a random password, so I need a random function. Is there such function
> in Postgres? I just found the RANDOM which generates values between
> 0.0 and 1.0.
> 
> Any help or suggestion will be appreciated. :)

I would do someting like:

select substring(md5(random() || random()), 5, 8);

Sincerely,

Joshua D. Drkae




> 
> Fernando Lujan
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
>        choose an index scan if your joining column's datatypes do not
>        match


-- 
Your PostgreSQL solutions company - Command Prompt, Inc. 1.800.492.2240
PostgreSQL Replication, Consulting, Custom Programming, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/
В списке pgsql-general по дате отправления
От: Greg Stark
Дата:
От: Sebastian Hennebrueder
Дата:
Сообщение: Re: Generating random values.
FAQ