Re: [despammed] Generating random values.

From: "A(dot) Kretschmer" <akretschmer(at)despammed(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: [despammed] Generating random values.
Date: 2005-08-17 17:59:01
Message-ID: 20050817175901.GB26603@webserv.wug-glas.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

am 17.08.2005, um 13:48:38 -0300 mailte Fernando Lujan folgendes:
> 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. :)

select substring(md5(random()) from 5 for 15);

Regards, Andreas
--
Andreas Kretschmer (Kontakt: siehe Header)
Heynitz: 035242/47212, D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
=== Schollglas Unternehmensgruppe ===

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sebastian Hennebrueder 2005-08-17 18:03:01 Re: PostgreSQL 8.0.3 limiting max_connections to 64 ?
Previous Message Bill Moseley 2005-08-17 17:49:12 Schema design question