From: Jackson, DeJuan <djackson@cpsgroup.com>
To: Mauro Bartolomeoli <mbarto@novacomp.it>
Cc: pgsql-sql@postgreSQL.org, PostgreSQL Hackers Mailing List <pgsql-hackers@hub.org>
Subject: RE: [SQL] random tuple
Date: Thu, 8 Oct 1998 11:46:49 -0500
Message-ID: <F10BB1FAF801D111829B0060971D839F45FE9D@cpsmail> (raw)
> On 07-Oct-98 Jackson, DeJuan wrote:
> >> Is there any way to select a random row from a table using an SQL
> >> query?
> >> I'm using Postgresql 6.3.2.
> >>
> > I'd look at using cursors and random().
>
> It's a good idea. Do you (or someone else) know how to use the
> following
> PostgreSQL functions: oidrand(oid,int4) ,oidsrand(int4)? What are they
> intended for and what is their result?
>
Never seen them before but it looks like:
oidsrand(int4) -- seeds the random number generator for oidrand to
use
oidrand(oid, int4) -- returns a psudo-random oid
The parameters to oidrand I can't figure out.
Anybody else?
-DEJ
> ---
>
> ------------------------------------
> Mauro Bartolomeoli
> e-mail: mbarto@novacomp.it
> ICQ#: 9602542
> ------------------------------------
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: djackson@cpsgroup.com, mbarto@novacomp.it, pgsql-hackers@hub.org
Subject: Re: [SQL] random tuple
In-Reply-To: <F10BB1FAF801D111829B0060971D839F45FE9D@cpsmail>
References: <F10BB1FAF801D111829B0060971D839F45FE9D@cpsmail>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox