Re: add more frame types in window functions (ROWS) - Mailing list pgsql-hackers

From Hitoshi Harada
Subject Re: add more frame types in window functions (ROWS)
Date
Msg-id e08cc0400911290046t3620ae6cid15b69a70360b154@mail.gmail.com
Whole thread Raw
In response to Re: add more frame types in window functions (ROWS)  (Hitoshi Harada <umi.tanuki@gmail.com>)
Responses Re: add more frame types in window functions (ROWS)
Re: add more frame types in window functions (ROWS)
List pgsql-hackers
2009/11/19 Hitoshi Harada <umi.tanuki@gmail.com>:
> 2009/11/19 Andrew Gierth <andrew@tao11.riddles.org.uk>:
>> Small nitpicks: there are some comments not updated (e.g. the
>> big one at the start of eval_windowaggregates). A couple of lines are
>> commented-out using C++ comments.

Fixed. Document patch is included as well.

>>  - missing _readWindowFrameDef function (all nodes that are output
>>   from parse analysis must have both _read and _out functions,
>>   otherwise views can't work)

I changed my mind and WindowFrameDef is alive only in initial parser
stage so that _readWindowFrameDef is now unnecessary. Information of
startOffset and endOffset will be copied to WindowClause members.

>>  - the A_Const nodes should probably be transformed to Const nodes in
>>   parse analysis, since A_Const has no _read/_out functions, which
>>   means changing the corresponding code in the executor.

Fixed.

>>  - ruleutils.c not updated to deparse the newly added window options

Fixed.

>>  - leaks memory like it's going out of style

As earlier mail, I added aggcontext to WindowAggState.

Still it doesn't contain RANGE ... PRECEDING / FOLLOWING. If it's not
acceptable for commit without RANGE value support, I'd agree with
that. I'm planning to work on that until the next CommitFest.


Regards,

--
Hitoshi Harada

Attachment

pgsql-hackers by date:

Previous
From: Hitoshi Harada
Date:
Subject: Frame level memory in WindowAgg?
Next
From: Alexey Klyukin
Date:
Subject: Re: plperl and inline functions -- first draft