From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com> |
Subject: | Re: Support isEmptyStringInfo |
Date: | 2022-03-23 12:35:43 |
Message-ID: | CA+TgmoaeuFSi5HBgBGO95ZnSnxgGDVLfwX=SSg6yDS6w1fahvg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Mar 23, 2022 at 8:33 AM Ashutosh Bapat
<ashutosh(dot)bapat(dot)oss(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Petr Jelinek | 2022-03-23 12:46:29 | Re: logical decoding and replication of sequences |
Previous Message | Ashutosh Bapat | 2022-03-23 12:32:44 | Support isEmptyStringInfo |