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-26T10:49:42Z
Lists: pgsql-hackers
On Sun, 25 Jan 2026 at 23:14, David Rowley <dgrowleyml@gmail.com> wrote: > I came up with the attached for that. I did write the list_uniquify() > before I realised your fix is ok for master. That function might be > misplaced just in the backbranches, and it might be better to just > foreach and if (!list_member()) directly in optimize_window_clauses() > to get rid of the duplicates. That's probably safer too. I pushed the deduplication code removal to master and adjusted the backpatch version to do the foreach -> if (!list_memeber()) as mentioned above. 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