Skip site navigation (1) Skip section navigation (2)

TODO items for window functions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Hitoshi Harada" <umi(dot)tanuki(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: TODO items for window functions
Date: 2008-12-28 19:26:01
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
The core window-functions patch is now committed and ready for wider
testing.  However, there are a number of unfinished items, at least
some of which I'd like to see addressed before 8.4 release.  In rough
order of importance:

* Support creation of user-defined window functions.  I think this is
a "must have" for 8.4 --- we are not in the habit of building
nonextensible basic features.  It doesn't seem that hard either.
I think all we need do is to allow "WINDOW" as an attribute keyword
in CREATE FUNCTION.  Does anyone have an objection or a better idea?

* Implement support for non-default window framing clauses.  Most likely
it's too late to consider getting the whole feature done for 8.4, but
I wonder whether we could support the restricted case of allowing just
these two combinations
I said earlier that we didn't really need to address this for 8.4,
but my thinking was flawed.  The case I think is really important
is to allow last_value() to do something useful, and you can hardly
argue that it's useful without an ORDER BY to define which row in the
partition is "last".

* Investigate whether we should prohibit window functions in recursive
terms; check whether any of the committed prohibitions are unnecessary.

* Look at tuplestore performance issues. The tuplestore_in_memory()
thing is just a band-aid, we ought to try to solve it properly.
tuplestore_advance seems like a weak spot as well.

* Do we really need so much duplicated code between Agg and WindowAgg?

			regards, tom lane


pgsql-hackers by date

Next:From: Tom LaneDate: 2008-12-28 20:21:16
Subject: ecpg regression test failures caused by window functions patch
Previous:From: Tom LaneDate: 2008-12-28 18:58:16
Subject: Re: Windowing Function Patch Review -> Standard Conformance

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group