select a random record - Mailing list pgsql-general

From bj@zuto.de (Rainer Clasen)
Subject select a random record
Date
Msg-id 20010901085750.C18947@zuto.de
Whole thread Raw
Responses Re: select a random record
List pgsql-general
Hi!

I'm currently thinking about building a completely database driven
jukebox. It will integrate with an already existing (well kind of) library
for my music files (and more).

This jukebox should offer a random play mode. It should take into account
when the title was played the last time. My Idea is to submit the query
returning the records ordered by their last time of play, ignore a random
number of records, fetch one record and drop the result set.

I'm wondering wether there is a more elegant way to fetch a random record
from a result.

Rainer

--
KeyID=759975BD fingerprint=887A 4BE3 6AB7 EE3C 4AE0  B0E1 0556 E25A 7599 75BD

pgsql-general by date:

Previous
From: A_Schnabel@t-online.de (Andre Schnabel)
Date:
Subject: Re: PgAdmin question - superuser
Next
From: bj@zuto.de (Rainer Clasen)
Date:
Subject: Re: select a random record