pgsql: Fix bugs with degenerate window ORDER BY clauses in GROUPS/RANGE

2018-07-11 Thread Tom Lane
Fix bugs with degenerate window ORDER BY clauses in GROUPS/RANGE mode. nodeWindowAgg.c failed to cope with the possibility that no ordering columns are defined in the window frame for GROUPS mode or RANGE OFFSET mode, leading to assertion failures or odd errors, as reported by Masahiko Sawada and

pgsql: Fix bugs with degenerate window ORDER BY clauses in GROUPS/RANGE

2018-07-11 Thread Tom Lane
Fix bugs with degenerate window ORDER BY clauses in GROUPS/RANGE mode. nodeWindowAgg.c failed to cope with the possibility that no ordering columns are defined in the window frame for GROUPS mode or RANGE OFFSET mode, leading to assertion failures or odd errors, as reported by Masahiko Sawada and