Re: Lots of incorrect comments in nodeFuncs.c - Mailing list pgsql-hackers

From David Rowley
Subject Re: Lots of incorrect comments in nodeFuncs.c
Date
Msg-id CAApHDvoF2d9nkbcmAoD8y9TUHPEaK4ekaZVQ_mn+R-0O4bEEUg@mail.gmail.com
Whole thread Raw
In response to Re: Lots of incorrect comments in nodeFuncs.c  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Lots of incorrect comments in nodeFuncs.c
List pgsql-hackers
On Fri, 9 Apr 2021 at 13:52, Michael Paquier <michael@paquier.xyz> wrote:
>
> On Thu, Apr 08, 2021 at 09:21:30PM -0400, Alvaro Herrera wrote:
> > On 2021-Apr-08, Tom Lane wrote:
> >> Maybe like
> >>
> >>                 case T_ScalarArrayOpExpr:
> >>                     /* ScalarArrayOpExpr's result is boolean ... */
> >>                     coll = InvalidOid;      /* ... so it has no collation */
> >>                     break;
> >
> > This is much clearer, yeah.
>
> +1.

Yeah, that's much better.

For the exprSetCollation case, I ended up with:

                 case T_ScalarArrayOpExpr:
                     /* ScalarArrayOpExpr's result is boolean ... */
                     Assert(!OidIsValid(collation)); /* ... so never
set a collation */

I wanted something more like /* ... so we must never set a collation
*/ but that put the line longer than 80. I thought wrapping to a 2nd
line was excessive, so I shortened it to that.

David

Attachment

pgsql-hackers by date:

Previous
From: Justin Pryzby
Date:
Subject: Re: missing documentation for streaming in-progress transactions
Next
From: Bharath Rupireddy
Date:
Subject: Re: Simplify backend terminate and wait logic in postgres_fdw test