Re: [HACKERS] Some semantic details of the window-function spec

2008-12-23 Thread Hitoshi Harada
2008/12/23 Tom Lane : > "Hitoshi Harada" writes: >> 2008/12/23 Tom Lane : >>> * Unlike aggregates, there doesn't seem to be any concept of a window >>> function being attached to an outer-level query --- in fact 6.10 rule >>> 4 says that a window function's argument can't contain outer references

Re: [HACKERS] Some semantic details of the window-function spec

2008-12-22 Thread Tom Lane
"Hitoshi Harada" writes: > 2008/12/23 Tom Lane : >> * Unlike aggregates, there doesn't seem to be any concept of a window >> function being attached to an outer-level query --- in fact 6.10 rule >> 4 says that a window function's argument can't contain outer references >> at all. That seems exces

Re: [HACKERS] Some semantic details of the window-function spec

2008-12-22 Thread Hitoshi Harada
2008/12/23 Tom Lane : > * Unlike aggregates, there doesn't seem to be any concept of a window > function being attached to an outer-level query --- in fact 6.10 rule > 4 says that a window function's argument can't contain outer references > at all. That seems excessively strong, but it does seem

[HACKERS] Some semantic details of the window-function spec

2008-12-22 Thread Tom Lane
After a couple of hours reading the SQL:2008 spec, I've come to some conclusions about the semantics that are demanded for window functions. Anyone want to to check my work? * If window functions are used together with aggregates or grouping, the grouping and regular aggregation happens first, and