Re: FILTER for aggregates [was Re: Department of Redundancy Department: makeNode(FuncCall) division]

From: David Fetter <david(at)fetter(dot)org>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>, PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: FILTER for aggregates [was Re: Department of Redundancy Department: makeNode(FuncCall) division]
Date: 2013-06-21 05:16:38
Message-ID: 20130621051638.GE5395@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jun 21, 2013 at 12:10:25AM -0400, Alvaro Herrera wrote:
> David Fetter escribió:
> > On Thu, Jun 20, 2013 at 08:59:27PM +0100, Dean Rasheed wrote:
>
> > > In my testing of sub-queries in the FILTER clause (an extension to the
> > > spec), I was able to produce the following error:
> >
> > Per the spec,
> >
> > B) A <filter clause> shall not contain a <query expression>, a <window function>, or an outer reference.
>
> If this is not allowed, I think there should be a clearer error message.
> What Dean showed is an internal (not user-facing) error message.

Please find attached a patch which allows subqueries in the FILTER
clause and adds regression testing for same.

Cheers,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

Attachment Content-Type Size
filter_006.diff text/plain 41.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Fetter 2013-06-21 05:54:13 Re: Review: UNNEST (and other functions) WITH ORDINALITY
Previous Message Gurjeet Singh 2013-06-21 04:47:16 Re: Config reload/restart preview