Re: R: R: complex custom aggregate function - Mailing list pgsql-general

From Scara Maccai
Subject Re: R: R: complex custom aggregate function
Date
Msg-id 898922.56352.qm@web24612.mail.ird.yahoo.com
Whole thread Raw
In response to complex custom aggregate function  (Scara Maccai <m_lists@yahoo.it>)
Responses Re: R: R: complex custom aggregate function
List pgsql-general
Paolo Saudin wrote:
> I use a master table with a "fulldate" field and filled with sequential dates to
> fill gaps when meteo data is missing.

I'm sorry, I still don't get it: how can you be sure that postgresql won't call perl_sliding_mean with not-ordered
timestamps-data?I don't mean only in case of holes. 

The "order by" as far as I know is usually done at the very end of the plan, so I don't think it can affect the order
ofthe data passed to the function... 
Suppose you have data like:
01/01/2009 1.00    -7
01/01/2009 2.00    -7,1
01/01/2009 3.00    -5,3
01/01/2009 4.00    -5,2
01/01/2009 5.00    -4,8
01/01/2009 6.00    -4



What does prevent postgresql to call your function with data in this order:
01/01/2009 6.00    -4
01/01/2009 1.00    -7
01/01/2009 5.00    -4,8
01/01/2009 3.00    -5,3
01/01/2009 2.00    -7,1
01/01/2009 4.00    -5,2

and reorder ("order by fulltime") at the very end (when results from the function are already out)?

Thank you for your patience.





pgsql-general by date:

Previous
From: Mohamed
Date:
Subject: Re: Fulltext search configuration
Next
From: Mohamed
Date:
Subject: Re: Fulltext search configuration