Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id B6D809F9429 for ; Thu, 16 Nov 2006 16:54:52 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 35343-07 for ; Thu, 16 Nov 2006 16:54:46 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.171]) by postgresql.org (Postfix) with ESMTP id 84BC69F9424 for ; Thu, 16 Nov 2006 16:54:45 -0400 (AST) Received: by ug-out-1314.google.com with SMTP id k3so477944ugf for ; Thu, 16 Nov 2006 12:54:42 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=EODIeif3mxl+a0m4Wvqnk7/n2cDvF54c1NgljJn8hfLkxhWoV8chzwug61elubDxiVm0el4nmA+RHHlkVqSFccUJSHwGc7mNZgUM75fpeYsahfrkXEjilKnvIn6uH2hiOs/G+wGCIOpyUXY/I+nQjetBfdQravjAkhejPFTLuH0= Received: by 10.67.117.18 with SMTP id u18mr971609ugm.1163710482521; Thu, 16 Nov 2006 12:54:42 -0800 (PST) Received: by 10.67.118.11 with HTTP; Thu, 16 Nov 2006 12:54:42 -0800 (PST) Message-ID: <55c095e90611161254w271e6781h6ee0d09a5be60db1@mail.gmail.com> Date: Thu, 16 Nov 2006 18:54:42 -0200 From: "Ezequias Rodrigues da Rocha" To: "A. Kretschmer" Subject: Re: Random() Cc: pgsql-sql@postgresql.org In-Reply-To: <20061116191632.GA21285@a-kretschmer.de> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_32125_18896356.1163710482339" References: <55c095e90611161031h7a1ce42chd9a59a53ba7e7028@mail.gmail.com> <20061116191632.GA21285@a-kretschmer.de> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/174 X-Sequence-Number: 26826 ------=_Part_32125_18896356.1163710482339 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Just another question. I can trust on this random number ? The rule to it i= s quite tested ? I am thinking in implementing a function that return allways a random number. What do you think of the trust of this function (random()) ? My bigint field has 20,000 numbers and I'd like to make real random (used like lottery). Regards Ezequias 2006/11/16, A. Kretschmer : > > am Thu, dem 16.11.2006, um 16:31:14 -0200 mailte Ezequias Rodrigues da > Rocha folgendes: > > Hi list, > > > > I have a bigint collumn and I would like to generate a random number > within the > > numbers of my column. > > select from order by random() limit 1; > > > Andreas > -- > Andreas Kretschmer > Kontakt: Heynitz: 035242/47215, D1: 0160/7141639 (mehr: -> Header) > GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net > > ---------------------------(end of broadcast)--------------------------- > TIP 1: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly > --=20 =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D= -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Atenciosamente (Sincerely) Ezequias Rodrigues da Rocha =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D= -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- A pior das democracias ainda =E9 melhor do que a melhor das ditaduras The worst of democracies is still better than the better of dictatorships http://ezequiasrocha.blogspot.com/ ------=_Part_32125_18896356.1163710482339 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Just another question. I can trust on this random number ? The rule to it i= s quite tested ?

I am thinking in implementing a function that retur= n allways a random number. What do you think of the trust of this function = (random()) ?

My bigint field has 20,000 numbers and I'd like to make real random= (used like lottery).


Regards
Ezequias

2006/11/16, A. Kretschmer < andreas.kretschmer@schollglas.com>:
am  Thu, dem 16.11.2006, um 16:31= :14 -0200 mailte Ezequias Rodrigues da Rocha folgendes:
> Hi list,
>
> I have a bigint collumn and I would like = to generate a random number within the
> numbers of my column.
select <bigint_column> from <your_table> order by random() lim= it 1;


Andreas
--
Andreas Kretschmer
Kontakt:  Heyn= itz: 035242/47215,   D1: 0160/7141639 (mehr: -> Header)
Gnu= PG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net

---------------------------(end of broadcast)------------------= ---------
TIP 1: if posting/reading through Usenet, please send an appro= priate
       subscribe-nomail command to = majordomo@postgresql.org so that your
     =   message can get through to the mailing list cleanly
=



--
=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D= -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-= =3D-=3D-=3D-=3D-=3D-=3D-=3D-
            = ;            &n= bsp;         Atenciosamente (S= incerely)
          &n= bsp;            = ; Ezequias Rodrigues da Rocha
=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-= =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D= -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-
A pior das democracias ainda =E9 melho= r do que a melhor das ditaduras
The worst of democracies is still better than the better of dictatorshi= ps
http://ezequiasrocha.= blogspot.com/ ------=_Part_32125_18896356.1163710482339--