Hi,
> So - basically you want something like:
>
> SELECT * from emotions
> WHERE emotion_date <= [cutoff time]
> ORDER BY calculated_score(date_epoch,full_rating)
> LIMIT 300
yes, thats it -- nearly :-)
In detail the calculated_score is:
(cutoff_time - creation_time) + (sum_of_rating_points
From: "Alvar Freude" <[EMAIL PROTECTED]>
> For now i do the hole stuff on client side with two selects:
> First selecting the end_id, then (2. Statement) sort the stuff within
> end_id and end_id-3000 and return the 300 most "best".
>
>
> my $end_id = $self->db_h->selectrow_array(
> "SEL
>> How should I do this?
>
> Can't at the moment.
ups, OK -- then I misunderstand something ;)
>> or, in more detail the exact function:
>>
>>
>>CREATE FUNCTION get_emotions (timestamp) RETURNS SETOF records AS
>> '
>> DECLARE
>> start ALIAS FOR $1;
>>
Currently, this is not possible.
It will be possible in 7.2, or with a patch I'm working on...
On Mon, 9 Jul 2001, Alvar Freude wrote:
> Hi,
>
> I want to create a function (PL/pgSQL), which return multiple rows. But it
> fails -- when Creating the function, I get a notice:
>
> NOTICE: Pro
From: "Alvar Freude" <[EMAIL PROTECTED]>
> Hi,
>
> I want to create a function (PL/pgSQL), which return multiple rows. But it
> fails -- when Creating the function, I get a notice:
> How should I do this?
Can't at the moment.
> or, in more detail the exact function:
>
>
>CREATE FUNCTION ge
Hi,
I want to create a function (PL/pgSQL), which return multiple rows. But it
fails -- when Creating the function, I get a notice:
NOTICE: ProcedureCreate: return type 'records' is only a shell
When executing it, this error:
ERROR: fmgr_info: function 0: cache lookup failed
How shoul