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

Re: Window-functions patch handling of aggregates

From: "Robert Haas" <robertmhaas(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Greg Stark" <greg(dot)stark(at)enterprisedb(dot)com>, "Hitoshi Harada" <umi(dot)tanuki(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Window-functions patch handling of aggregates
Date: 2008-12-26 20:57:59
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
> 1. Go back to Hitoshi's plan of passing WindowAggState to the
> aggregates.  This will require changing every one of the ten aggregates
> in the core distro, as well as every third-party aggregate that has
> a similar optimization; and we just have to keep our fingers crossed
> that anyone who's taking a short-cut will fix their code before it
> fails in the field.

Unfortunately, if we don't want to add an explicit iswindowable flag
(and I understand that that's ugly), then I think this is the way to
go.  It's a shame that people will have to make code changes, but
inventing a fake AggState object just to get around this problem
sounds worse.  The array_agg code is new and the fact that it doesn't
follow the design pattern should be considered a bug in that code
rather than a justification for an ugly workaround.


In response to


pgsql-hackers by date

Next:From: Tom LaneDate: 2008-12-26 21:04:34
Subject: Frames vs partitions: is SQL2008 completely insane?
Previous:From: David FetterDate: 2008-12-26 20:24:24
Subject: Re: Window-functions patch handling of aggregates

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