Re: Support isEmptyStringInfo

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Support isEmptyStringInfo
Дата
Msg-id CA+TgmoaeuFSi5HBgBGO95ZnSnxgGDVLfwX=SSg6yDS6w1fahvg@mail.gmail.com
обсуждение исходный текст
Ответы Re: Support isEmptyStringInfo
Список pgsql-hackers
On Wed, Mar 23, 2022 at 8:33 AM Ashutosh Bapat
<ashutosh.bapat.oss@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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Ashutosh Bapat
Дата:
Сообщение: Support isEmptyStringInfo
Следующее
От: Petr Jelinek
Дата:
Сообщение: Re: logical decoding and replication of sequences