Re: Windowing Function Patch Review -> Standard Conformance - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Windowing Function Patch Review -> Standard Conformance
Date
Msg-id 4480.1229722371@sss.pgh.pa.us
Whole thread Raw
In response to Re: Windowing Function Patch Review -> Standard Conformance  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: Windowing Function Patch Review -> Standard Conformance  ("Hitoshi Harada" <umi.tanuki@gmail.com>)
List pgsql-hackers
I've been studying the grammar for the windowing patch a bit.  It seems
to me that the <existing window name> option for <window specification>
got left out.  I think that WindowDef needs to have two name fields,
one for the name (if any) defined by the window definition, and one
for the referenced window name if any.  Also the "OVER name" syntax
seems like it maps to a referenced window name not a defined window
name.

I am also fairly strongly inclined to rip out all of the frame_clause
syntax, since (1) it's unimplemented and unlikely to get implemented
for 8.4, and (2) it's not particularly satisfactory anyway.  The
frame_bound_const business has to be rethought, because it's ugly and
it doesn't even satisfy the limited requirements of the spec (cf
<general value specification> which is an allowed alternative for
<unsigned value specification>).  It might be that we'll end up having
to make BETWEEN be a fully reserved word in order to implement that
syntax.

BTW, I notice we also have not implemented the spec's bizarre
RESPECT NULLS/IGNORE NULLS decoration for lead/lag or FROM FIRST/LAST
for nth_value.  This is fine with me, but we probably ought to document
workarounds for that, if possible.  I guess FROM FIRST/LAST could be
handled by reversing the window sort order; what about the NULLS stuff?

Comments?
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: Hot standby and b-tree killed items
Next
From: Robert Lor
Date:
Subject: Re: DTrace probes patch