Re: R: R: complex custom aggregate function

From: Scara Maccai <m_lists(at)yahoo(dot)it>
To: Paolo Saudin <paolo(at)ecometer(dot)it>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: R: R: complex custom aggregate function
Date: 2009-02-02 14:30:38
Message-ID: 898922.56352.qm@web24612.mail.ird.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 of the 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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Eric Brown 2009-02-02 14:40:16 Is dropping pg_ts_* harmful?
Previous Message Mohamed 2009-02-02 14:25:48 Re: Fulltext search configuration