From: | "Hitoshi Harada" <umi(dot)tanuki(at)gmail(dot)com> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Sample of user-define window function and other things |
Date: | 2009-01-08 13:30:05 |
Message-ID: | e08cc0400901080530x6c7d582apf1576c1c27ebde59@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2009/1/8 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> "Hitoshi Harada" <umi(dot)tanuki(at)gmail(dot)com> writes:
>> - Is WinGetFuncArgInPartition()'s argument mark_pos required? For the
>> newbies to window functions, it seems a bit confusing, but
>> WinSetMarkPos() looks enough for the purpose AFAIK.
>
> You mean set_mark? It's just to save an extra calculation of the
> absolute location of the fetched row. See leadlag_common for an
> example use: we can truncate the tuplestore if the offset is constant.
Yeah, I mean set_mark :P) I already checked leadlag_common example but
abs_pos can be very simply calculated by WinGetCurrentPosition() -
offset. So the simpler API is winner to me rather than saving few
cycle cpu cost.
Regards,
--
Hitoshi Harada
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2009-01-08 13:30:14 | Re: about truncate |
Previous Message | Tom Lane | 2009-01-08 13:11:41 | Re: Sample of user-define window function and other things |