Why can't I use windowing functions over ordered aggregates? - Mailing list pgsql-hackers

From Josh Berkus
Subject Why can't I use windowing functions over ordered aggregates?
Date
Msg-id 51C3AD31.2080504@agliodbs.com
Whole thread Raw
Responses Re: Why can't I use windowing functions over ordered aggregates?  (Cédric Villemain <cedric@2ndquadrant.com>)
List pgsql-hackers
Hackers,

So, I can create a custom aggregate "first" and do this:

SELECT first(val order by ts desc) ...

And I can do this:

SELECT first_value(val) OVER (order by ts desc)

... but I can't do this:

SELECT first_value(val order by ts desc)

... even though under the hood, it's the exact same operation.

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: changeset generation v5-01 - Patches & git tree
Next
From: Bruce Momjian
Date:
Subject: Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)