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

From Vladimir Sitnikov
Subject Re: Windowing Function Patch Review -> Standard Conformance
Date
Msg-id 1d709ecc0811041922y2af09fderf605eedc098222e4@mail.gmail.com
Whole thread Raw
In response to Re: Windowing Function Patch Review -> Standard Conformance  ("Hitoshi Harada" <umi.tanuki@gmail.com>)
Responses Re: Windowing Function Patch Review -> Standard Conformance  ("Hitoshi Harada" <umi.tanuki@gmail.com>)
List pgsql-hackers

Even though I understand the definition, your suggestion of COUNT(*)
OVER (ORDER BY salary) doesn't make sense.
Why does not that make sense?
I have not read the spec, however Oracle has a default window specification in case there is only an order by clause. The default window is "range between unbounded preceding and current row".

"count(*) over (order by salary range between unbounded preceding and current row)" is perfectly identical to the "number of rows preceding or peers to R" by the definition, isn't it? I see here a word-by-word translation from SQL to the English and vice versa.

If the patch returns "row_number" it is wrong since there is no way for row_number to be a "number of rows preceding or peer with R", is there?

Regards,
Vladimir Sitnikov

pgsql-hackers by date:

Previous
From: "Hitoshi Harada"
Date:
Subject: Re: Windowing Function Patch Review -> Standard Conformance
Next
From: "Robert Haas"
Date:
Subject: Re: [WIP] In-place upgrade