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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

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: Sun, 28 Dec 2008 14:26:01 -0500
  • Message-id: <357.1230492361@sss.pgh.pa.us> <text/plain>

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
	BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW (which is default)
	BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING
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



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group