From: | Einar Karttunen <ekarttun(at)cs(dot)Helsinki(dot)FI> |
---|---|
To: | <ghaverla(at)freenet(dot)edmonton(dot)ab(dot)ca> |
Cc: | <pgsql-novice(at)postgresql(dot)org> |
Subject: | Re: Re: Re: Re: RANDOM function? |
Date: | 2001-07-31 14:09:07 |
Message-ID: | Pine.LNX.4.33.0107311704430.20135-100000@melkinpaasi.cs.Helsinki.FI |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
On Tue, 31 Jul 2001 ghaverla(at)freenet(dot)edmonton(dot)ab(dot)ca wrote:
>
> The only thing I would add, is your multiplier (2147...) must
> always be big, with respect to how many times you want to draw
> this random number without replacement. If you were wanting
> to draw 2000000000 random numbers, this method would bog
> down in rejections (insert failures) towards the end.
>
You cannot go higher if you use an int column because it is a signed 32
bit integer. If you need more use bigints. They will suffice. If not
you are screwed anyways because oids don't suffice.
- Einar Karttunen
From | Date | Subject | |
---|---|---|---|
Next Message | Neal Lindsay | 2001-07-31 14:25:03 | Dividing (and rounding) a date? |
Previous Message | ghaverla | 2001-07-31 13:58:21 | Re: Re: Re: Re: RANDOM function? |