From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | David Fetter <david(at)fetter(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: proposal: tuplestore, tuplesort aggregate functions |
Date: | 2010-08-18 15:42:59 |
Message-ID: | AANLkTimkt7BDjvSNM32rVi8h8K1qbCzzvibr7XCsryv9@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2010/8/18 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
>> 2010/8/18 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
>>> There would be plenty of scope to re-use the machinery without any
>>> SQL-level extensions. All you need is a polymorphic aggregate
>>> transition function that maintains a tuplestore or whatever.
>
>> Have we to use a transisdent function? If we implement median as
>> special variant of aggregate - because we need to push an sort, then
>> we can skip a transident function function - and call directly final
>> function.
>
> Well, that would require a whole bunch of *other* mechanisms, which you
> weren't saying anything about in your original proposal. But driving
> it off the transtype declaration would be quite inappropriate anyway IMO.
>
I'll test both variant first. Maybe there are not any significant
difference between them. Now nodeAgg can build, fill a tuplesort. So I
think is natural use it. It needs only one - skip a calling a
transident function and directly call final function with external
tuplesort. Minimally you don't need 2x same code.
Regards
Pavel Stehule
> regards, tom lane
>
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Haggerty | 2010-08-18 15:49:36 | Re: git: uh-oh |
Previous Message | Tom Lane | 2010-08-18 15:35:19 | Re: proposal: tuplestore, tuplesort aggregate functions |