Re: WITHIN GROUP patch

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Johnston <polobo(at)yahoo(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: WITHIN GROUP patch
Date: 2013-12-06 03:07:57
Message-ID: 27568.1386299277@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

David Johnston <polobo(at)yahoo(dot)com> writes:
> The original design references the spec as allowing a column reference if it
> is a group by key:

> Select cume_dist(f1) within group ( order by f1 ) from text_tbl group by f1

> No example was shown where this would be useful...but nonetheless the
> comment and error both presume that such is true.

I can see no support for that position in the spec text, and as you say,
the usefulness is at best really debatable. Unless somebody can present a
credible use-case, or convince me that this is indeed what the spec says,
I'd be inclined to blow this off in favor of having a more intelligible
error message. (I think if you really did need such functionality, you
could get it with a sub-select.)

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabrízio de Royes Mello 2013-12-06 03:16:38 Re: dblink performance regression
Previous Message Joe Conway 2013-12-06 03:05:14 Re: dblink performance regression