From: | Chris Travers <chris(at)travelamericas(dot)com> |
---|---|
To: | Edmund <ebacon-xlii(at)onesystem(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Generating random values. |
Date: | 2005-08-18 16:25:29 |
Message-ID: | 4304B679.407@travelamericas.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Edmund wrote:
>jd(at)commandprompt(dot)com ("Joshua D. Drake") writes:
>
>
>
>>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
>>
>>
>
>Great! a simple, dumb program can generate all your passwords in very
>quickly. My 2.4 Ghz Pentium 4 did it in under 10 minutes. A token set of
>16 characters, and a fixed length of 8 charachters just isnt a very big
>search space.
>
>
>
>
This is why I suggested a variable-length random string function. But
this not as trivial to impliment.
Best Wishes,
Chris Travers
From | Date | Subject | |
---|---|---|---|
Next Message | Mike Nolan | 2005-08-18 16:52:16 | Re: Generating random values. |
Previous Message | Martijn van Oosterhout | 2005-08-18 15:59:25 | Re: PostgreSQL 8.0.3 limiting max_connections to 64 ? |