Re: typedef struct WindowClause misleading comments

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Rowley <dgrowleyml@gmail.com>
Cc: jian he <jian.universality@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2026-06-12T16:15:32Z
Lists: pgsql-hackers

Attachments

David Rowley <dgrowleyml@gmail.com> writes:
> On Wed, 10 Jun 2026 at 04:54, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> +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.

All these changes look good, but I have a few more suggestions,
attached as a delta on top of yours.  Notably

  * - query_jumble_location: Mark the field as a location to track.  This is
- *   only allowed for integer fields that include "location" in their name.
+ *   only used for fields of type ParseLoc, which otherwise are not jumbled.

If you look at how gen_node_support.pl implements that annotation,
my revised statement is correct about the field type, and I don't
see anything that actually constrains the field name to be "location".
Maybe some earlier implementation behaved that way?

			regards, tom lane

Commits

  1. Fix various query jumble comments