Re: Fix a reference error for window functions: In the function 'find_window_functions', the deduplication logic should be removed

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Meng Zhang <mza117jc(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Fix a reference error for window functions: In the function 'find_window_functions', the deduplication logic should be removed
Date: 2026-01-26 10:49:42
Message-ID: CAApHDvoqHpVdkkqNTZ-6LG673+yj02-pHJBAQevQgzk=PJcpxg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, 25 Jan 2026 at 23:14, David Rowley <dgrowleyml(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jelte Fennema-Nio 2026-01-26 10:50:34 Re: Safer hash table initialization macro
Previous Message Jelte Fennema-Nio 2026-01-26 10:47:24 Re: Make copyObject work in C++