From: | Sebastian Hennebrueder <usenet(at)laliluna(dot)de> |
---|---|
To: | Fernando Lujan <flujan(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Generating random values. |
Date: | 2005-08-17 17:42:43 |
Message-ID: | 43037713.1060301@laliluna.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Fernando Lujan schrieb:
>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. :)
>
>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
>
>
>
>
Create an array of characters and numbers.
Estimating the array size at 30
Calculate something like round(random * 30) and fetch a character from
the array.
Repeat this for each character
--
Best Regards / Viele Grüße
Sebastian Hennebrueder
----
Tutorials for JSP, JavaServer Faces, Struts, Hibernate and EJB
Get support, education and consulting for these technologies - uncomplicated and cheap.
From | Date | Subject | |
---|---|---|---|
Next Message | Bill Moseley | 2005-08-17 17:49:12 | Schema design question |
Previous Message | Mike Nolan | 2005-08-17 17:35:38 | Re: Generating random values. |