Received: from ra.sai.msu.su (ra.sai.msu.su [158.250.29.2]) by hub.org (8.9.3/8.9.3) with ESMTP id QAA66489 for ; Fri, 29 Oct 1999 16:49:08 -0400 (EDT) (envelope-from oleg@sai.msu.su) Received: from ra (ra [158.250.29.2]) by ra.sai.msu.su (8.9.1/8.9.1) with SMTP id AAA20591; Sat, 30 Oct 1999 00:47:50 +0400 (MSD) Date: Sat, 30 Oct 1999 00:47:49 +0400 (MSD) From: Oleg Bartunov X-Sender: megera@ra To: Oleg Bartunov cc: pgsql-sql@postgreSQL.org Subject: Re: [SQL] random query In-Reply-To: Message-ID: Organization: Sternberg Astronomical Institute (Moscow University) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Sat, 30 Oct 1999, Oleg Bartunov wrote: > Date: Sat, 30 Oct 1999 00:31:27 +0400 (MSD) > From: Oleg Bartunov > To: pgsql-sql@postgreSQL.org > Subject: [SQL] random query > > I need to get random value: > > select random(id) from messages where ..... > Is't possible with SQL ? Just to be correct - I need only one random row from matched rows. I've seen random.sql in regression test but didn't figured out yet how to use oidrand for my purpose. > > Oleg > > _____________________________________________________________ > Oleg Bartunov, sci.researcher, hostmaster of AstroNet, > Sternberg Astronomical Institute, Moscow University (Russia) > Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/ > phone: +007(095)939-16-83, +007(095)939-23-83 > > > ************ > _____________________________________________________________ Oleg Bartunov, sci.researcher, hostmaster of AstroNet, Sternberg Astronomical Institute, Moscow University (Russia) Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/ phone: +007(095)939-16-83, +007(095)939-23-83