Re: improve comments on CreateFunction returnsSet - Mailing list pgsql-hackers

From Andreas Karlsson
Subject Re: improve comments on CreateFunction returnsSet
Date
Msg-id e4473ba1-b390-4ea3-9f5b-0df30923280b@proxel.se
Whole thread Raw
In response to improve comments on CreateFunction returnsSet  (Zshengbin91 <zshengbin91@gmail.com>)
List pgsql-hackers
On 12/25/25 4:05 AM, Zshengbin91 wrote:
> I'm using postgres, and I found a potentially ambiguous code comment in 
> the `CreateFunction` function. `returnsSet` is a boolean variable, and 
> to be consistent with the subsequent error message, I believe the 
> comment should be modified to match the error message. "reject ROWS if 
> it's not returnsSet" should be changed to "reject ROWS if it does not 
> return a set"  Therefore, I've attached a patch to address this issue.

Hm,

I personally don't really think your change improves anything. Either 
version works just fine and I have a mild preferences for the original 
comment. Honestly if it was me writing the comment I would probably have 
entirely left out the part about rejecting since that is obvious from 
just reading the code but now that it is there it might as well stay.

Andreas




pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: LLVM 22
Next
From: Tom Lane
Date:
Subject: Re: Bug in amcheck?