Re: boolin comment not moved when code was refactored - Mailing list pgsql-hackers

From Tom Lane
Subject Re: boolin comment not moved when code was refactored
Date
Msg-id 3256742.1697687724@sss.pgh.pa.us
Whole thread Raw
In response to Re: boolin comment not moved when code was refactored  (Richard Guo <guofenglinux@gmail.com>)
Responses Re: boolin comment not moved when code was refactored
List pgsql-hackers
Richard Guo <guofenglinux@gmail.com> writes:
> On Thu, Oct 19, 2023 at 10:35 AM Peter Smith <smithpb2250@gmail.com> wrote:
>> I happened upon a function comment referring to non-existent code
>> (that code was moved to another location many years ago).
>>
>> Probably better to move that comment too. Thoughts?

> Agreed. +1 to move that comment.

Hm, I'm inclined to think that the comment lines just above:

 *        boolin            - converts "t" or "f" to 1 or 0
 *
 * Check explicitly for "true/false" and TRUE/FALSE, 1/0, YES/NO, ON/OFF.
 * Reject other values.

are also well past their sell-by date.  The one-line summary
"converts "t" or "f" to 1 or 0" is not remotely accurate anymore.
Perhaps we should just drop it?  Or else reword to something
vaguer, like "input function for boolean".  The "Check explicitly"
para no longer describes logic in this function.  We could move
it to parse_bool_with_len, but that seems to have a suitable
comment already.

In short, maybe the whole comment should just be

/*
 *    boolin - input function for type boolean
 */

Agreed with your original point, though.

            regards, tom lane



pgsql-hackers by date:

Previous
From: vignesh C
Date:
Subject: Re: pg_upgrade's interaction with pg_resetwal seems confusing
Next
From: Andrei Lepikhov
Date:
Subject: Re: Asymmetric partition-wise JOIN