From 8e8854daa2b4b3ef9e3fc1a56c79608a70018058 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 31 Dec 2008 00:08:39 +0000 Subject: Add some basic support for window frame clauses to the window-functions patch. This includes the ability to force the frame to cover the whole partition, and the ability to make the frame end exactly on the current row rather than its last ORDER BY peer. Supporting any more of the full SQL frame-clause syntax will require nontrivial hacking on the window aggregate code, so it'll have to wait for 8.5 or beyond. --- src/backend/parser/parse_clause.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/backend/parser/parse_clause.c') diff --git a/src/backend/parser/parse_clause.c b/src/backend/parser/parse_clause.c index df30361f0a5..247d54d8782 100644 --- a/src/backend/parser/parse_clause.c +++ b/src/backend/parser/parse_clause.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/parser/parse_clause.c,v 1.182 2008/12/28 18:53:58 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/parser/parse_clause.c,v 1.183 2008/12/31 00:08:37 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1554,7 +1554,7 @@ transformWindowDefinitions(ParseState *pstate, * Per spec, a windowdef that references a previous one copies the * previous partition clause (and mustn't specify its own). It can * specify its own ordering clause. but only if the previous one - * had none. + * had none. It always specifies its own framing clause. */ if (refwc) { @@ -1592,6 +1592,7 @@ transformWindowDefinitions(ParseState *pstate, wc->orderClause = orderClause; wc->copiedOrder = false; } + wc->frameOptions = windef->frameOptions; wc->winref = winref; result = lappend(result, wc); -- cgit v1.2.3