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-25 07:05:03
Message-ID: CAApHDvoW8LZuiGK+_cyAR7q2kgoEeZfjNwm6wK2KcpvTGbcRgQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, 25 Jan 2026 at 17:09, Meng Zhang <mza117jc(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tender Wang 2026-01-25 07:20:48 Re: Fix a reference error for window functions: In the function 'find_window_functions', the deduplication logic should be removed
Previous Message Junwang Zhao 2026-01-25 06:48:15 [PATCH] Replace COUNT(NULL) with '0'::bigint