Re: typedef struct WindowClause misleading comments - Mailing list pgsql-hackers

From David Rowley
Subject Re: typedef struct WindowClause misleading comments
Date
Msg-id CAApHDvp6qfdy+E+eVUpYF_U89wnX1yP=+DV4e_ARxCZyEqwYpQ@mail.gmail.com
Whole thread
In response to Re: typedef struct WindowClause misleading comments  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: typedef struct WindowClause misleading comments
List pgsql-hackers
On Wed, 10 Jun 2026 at 04:54, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> David Rowley <dgrowleyml@gmail.com> writes:
> > I think the comment should be deleted.  It's pretty obvious which
> > fields are used by looking at the pg_node_attr(query_jumble_ignore)
> > attributes.
>
> +1.  There are also other comments about query jumbling in nodes/*.h that
> seem pretty information-free now.  They might have been helpful before
> we invented query_jumble_ignore and related annotations, but now they
> seem just duplicative.

Here's a patch for that. I did leave a few comments which mention a
reason why a particular field is ignored. That seems like it could be
useful. I think I've got all the ones that just talk about what's
included or ignored.

One particular comment that I couldn't quite understand was:

"All constants are tracked as
* locations in query jumbling, to be marked as parameters."

Maybe that's talking about some prior method of tagging fields to
jumble. Anyway, it doesn't seem very relevant today, so I got rid of
it.

The header comment for WindowFunc also seems to have become misplaced
due to the IGNORE NULLS work. I shifted that back to the correct
location and removed the surplus jumble comments. Since the comment
then became empty, I wrote something about what the struct is for.

David

Attachment

pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: PG19 FK fast path: OOB write and missed FK checks during batched
Next
From: Xuneng Zhou
Date:
Subject: Re: Fix race in ReplicationSlotRelease for ephemeral slots