Re: Update EnableTimeoutParams timeout type comment

From: Xuneng Zhou <xunengzhou(at)gmail(dot)com>
To: John Naylor <johncnaylorls(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Update EnableTimeoutParams timeout type comment
Date: 2026-07-01 04:41:27
Message-ID: CABPTF7ULO517sMUKFJrTZ5ye-u9zFmXR-C1S_+mxrNYpB=Nh+A@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi John,

On Wed, Jul 1, 2026 at 12:01 PM John Naylor <johncnaylorls(at)gmail(dot)com> wrote:
>
> On Wed, Jul 1, 2026 at 8:44 AM Xuneng Zhou <xunengzhou(at)gmail(dot)com> wrote:
> > While reading the timeout code, I noticed that the comment for
> > EnableTimeoutParams timeout type is kinda stale. Currently, we support
> > three types of timeout TMPARAM_AFTER/AT/EVERY, but the comment only
> > mentions the first two. It may not cause confusion, since the two
> > structs are adjacent, but it might still be worth making this clearer.
> > Attached a patch to update it.
>
> It seems pointless to have a comment whose entire content is to list
> every current enum member of that type. I'd just delete the comment,
> since it's likely to just going to get outdated again. If any other
> objects of type enum have this, they should get the same treatment.

Agreed. The comment just duplicates nearby code and can easily go
stale again. Removing it also makes sense to me. Here's the patch with
the treatment.

--
Regards,
Xuneng Zhou
HighGo Software Co., Ltd.

Attachment Content-Type Size
v2-0001-Remove-stale-EnableTimeoutParams-type-comment.patch application/octet-stream 1022 bytes

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message solai v 2026-07-01 05:02:12 Re: Fwd: [PATCH] Support for basic ALTER TABLE progress reporting.
Previous Message Sami Imseih 2026-07-01 04:17:29 Re: Add pg_stat_kind_info system view