Re: Fix a reference error for window functions: In the function 'find_window_functions', the deduplication logic should be removed
David Rowley <dgrowleyml@gmail.com>
From: David Rowley <dgrowleyml@gmail.com>
To: Meng Zhang <mza117jc@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2026-01-25T07:05:03Z
Lists: pgsql-hackers
On Sun, 25 Jan 2026 at 17:09, Meng Zhang <mza117jc@gmail.com> wrote: > The deduplication logic won't cause an error when the result of this function is only used in `select_active_windows`. > But when the result is used in `optimize_window_clauses`, it will cause the `winref` field of a certain window function to not be modified in the new window. Thanks for the report. I'll have a look. David
Commits
-
Fix possible issue of a WindowFunc being in the wrong WindowClause
- 4297a35196de 16.12 landed
- cae812741167 17.8 landed
- ccde5be6869c 18.2 landed
-
Remove deduplication logic from find_window_functions
- 7027dd499dd6 19 (unreleased) landed
-
Allow window functions to adjust their frameOptions
- ed1a88ddaccf 16.0 cited