Received: from bjke.com (firewall-user@ganymede.bjke.com [144.210.8.38]) by hub.org (8.8.8/8.8.8) with ESMTP id MAA06299 for ; Thu, 8 Oct 1998 12:55:06 -0400 (EDT) (envelope-from djackson@cpsgroup.com) Received: by bjke.com; id LAA25955; Thu, 8 Oct 1998 11:55:02 -0500 (CDT) Received: from cpsmail.cpsgroup.com(144.210.12.11) by gauntlet.bjke.com via smap (4.1) id xmaa17272; Thu, 8 Oct 98 11:44:38 -0500 Received: by cpsmail with Internet Mail Service (5.0.1458.49) id <4KHRJS6Z>; Thu, 8 Oct 1998 11:46:52 -0500 Message-ID: From: "Jackson, DeJuan" To: Mauro Bartolomeoli Cc: pgsql-sql@postgreSQL.org, PostgreSQL Hackers Mailing List Subject: RE: [SQL] random tuple Date: Thu, 8 Oct 1998 11:46:49 -0500 X-Priority: 3 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.0.1458.49) Content-Type: text/plain > 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 > ------------------------------------