Re: Planning aggregates which require sorted or distinct

From: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
To: "Gavin Sherry" <swm(at)alcove(dot)com(dot)au>
Cc: "Karen Hill" <karen_hill22(at)yahoo(dot)com>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Planning aggregates which require sorted or distinct
Date: 2007-01-20 10:28:08
Message-ID: 1169288889.3776.50.camel@silverbirch.site
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, 2007-01-20 at 09:34 +1100, Gavin Sherry wrote:
> On Sat, 19 Jan 2007, Karen Hill wrote:
>
> > Gavin Sherry wrote:
> > > Recenly, I've been researching and putting together a proposal for window
> > > functions.

Good news.

> > Implementing NULLS FIRST and NULLS LAST appears like another
> > challenging step to getting window functions wrapped up. Has your
> > research lead you to any ideas on what your strategy for NULLS FIRST
> > and NULLS LAST likely would be?
>
> Explicit handling of NULL is only in the Oracle extension to window
> functions. I will look at the core SQL functionality first -- maybe with
> the extension of 'LEAD' and 'LAG' because they are heavily utilitised by
> those using window functions.

NULLS FIRST | LAST is part of SQL:2003, specifically the definition of a
window over which an aggregate function can be applied contains a sort
specification list.

> Besides, Tom's been working on NULLS FIRST/LAST already.

For that very reason, I imagined.

--
Simon Riggs
EnterpriseDB http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2007-01-20 11:06:23 Re: Planning aggregates which require sorted or distinct
Previous Message Markus Schiltknecht 2007-01-20 10:12:00 Re: Planning aggregates which require sorted or distinct