Skip site navigation (1) Skip section navigation (2)

RE: [SQL] random tuple

From: "Jackson, DeJuan" <djackson(at)cpsgroup(dot)com>
To: Mauro Bartolomeoli <mbarto(at)novacomp(dot)it>
Cc: pgsql-sql(at)postgreSQL(dot)org, PostgreSQL Hackers Mailing List <pgsql-hackers(at)hub(dot)org>
Subject: RE: [SQL] random tuple
Date: 1998-10-08 16:46:49
Message-ID: F10BB1FAF801D111829B0060971D839F45FE9D@cpsmail (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-sql
> 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(at)novacomp(dot)it
>  ICQ#: 9602542
> ------------------------------------

Responses

pgsql-hackers by date

Next:From: Brook MilliganDate: 1998-10-08 17:06:21
Subject: man page installation patch
Previous:From: djeDate: 1998-10-08 16:35:49
Subject: JOBOP Software Development Consultant

pgsql-sql by date

Next:From: Terry MackintoshDate: 1998-10-08 18:06:00
Subject: Re: [ADMIN] RE: [HACKERS] Re: [COMMITTERS] 'pgsql/doc/src/sgml protocol.sgml'
Previous:From: Jackson, DeJuanDate: 1998-10-08 16:29:23
Subject: RE: [HACKERS] Re: [COMMITTERS] 'pgsql/doc/src/sgml protocol.sgml'

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group