On Wed, Mar 23, 2022 at 8:33 AM Ashutosh Bapat
<ashutosh.bapat....@gmail.com> wrote:
> We have (StringInfo::len == 0) checks at many places. I thought it
> would be better to wrap that into a function isEmptyStringInfo() to
> make those checks more readable and also abstract the logic to check
> emptiness of a StringInfo. I think this will be useful to extensions
> outside core which also have these checks. They won't need to worry
> about that logic/code being changed in future; rare but not impossible
> case.

I think that the code is perfectly readable as it is and that this
change makes it less so.

-- 
Robert Haas
EDB: http://www.enterprisedb.com


Reply via email to