Re: wip: functions median and percentile - Mailing list pgsql-hackers

From Hitoshi Harada
Subject Re: wip: functions median and percentile
Date
Msg-id AANLkTi=-cKHt8i8DqEHTpd3p1PApLX1Mt37J5VV9v973@mail.gmail.com
Whole thread Raw
In response to Re: wip: functions median and percentile  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: wip: functions median and percentile
Re: wip: functions median and percentile
List pgsql-hackers
2010/9/26 Pavel Stehule <pavel.stehule@gmail.com>:
> Hello,
>
> there is updated version - with support of window clause. The limits
> are work_mem for using inside window aggregate or unlimited when it is
> used as standard query.
>
> This patch needs a few work - can share a compare functionality with
> tuplesort.c, but I would to verify a concept now.
>
> Comments?

Sorry for delay. I read the patch and it seems the result is sane. For
window function calls, I agree that the current tuplesort is not
enough to implement median functions and the patch introduces its own
memsort mechanism, although memsort has too much copied from
tuplesort. It looks to me not so difficult to modify the existing
tuplesort to guarantee staying in memory always if an option to do so
is specified from caller. I think that option can be used by other
cases in the core code.

Regards,


-- 
Hitoshi Harada


pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: Using streaming replication as log archiving
Next
From: Leonardo Francalanci
Date:
Subject: Re: I: About "Our CLUSTER implementation is pessimal" patch