| From: | Edmund <ebacon-xlii(at)onesystem(dot)com> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Generating random values. |
| Date: | 2005-08-17 21:54:40 |
| Message-ID: | m3br3wdyan.fsf@elb_lx.onesystem.ca |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Mike Rylander | 2005-08-17 21:55:51 | Re: speeding up a query on a large table |
| Previous Message | Stephan Szabo | 2005-08-17 21:52:47 | Re: [GENERAL] Cascades Failing |