Selecting random rows using weights

Поиск
Список
Период
Сортировка
Искать
От
G
Тема
Selecting random rows using weights
Дата
в 15:28:33
Msg-id
ILEPLGCLIJOCNINEJCJPIELNDJAA.gerard@interfold.com
Ответ на
Список
Дерево обсуждения
Converting epoc number to timestamp Doug Silver <dsilver@urchin.com>
Re: Converting epoc number to timestamp Oliver Elphick <olly@lfix.co.uk>
Selecting random rows using weights "G" <gerard@interfold.com>

Is there a way to select rows randomly using weight columns? (weighted
random values)

Thanks,
Gerard


> -----Original Message-----
> From: pgsql-novice-owner@postgresql.org
> [mailto:pgsql-novice-owner@postgresql.org]On Behalf Of Doug Silver
> Sent: Thursday, May 09, 2002 6:26 PM
> To: pgsql-novice@postgresql.org
> Subject: [NOVICE] Converting epoc number to timestamp
>
>
> Just curious if there's a way in Postgres to take an epoch number (UTC)
> which is stored as a bigint field and convert it to a timestamp.
>
> perl does it like so:
>
> $ perl -e 'print localtime(1020990264)."\n"'
> Thu May  9 17:24:02 2002
>
> Didn't see anything in the stored functions, but wanted to be sure.  If
> not, would it make sense to create my own function that would do it in the
> database or just code it on the front end (i.e. web app)?
>
>  --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Doug Silver
> Network Manager
> Urchin Corporation	http://www.urchin.com
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>

В списке pgsql-novice по дате отправления
От: Josh Berkus
Дата:
От: Joel Burton
Дата:
FAQ