Re: [PATCH] Improve function toast_delete_external (src/backend/access/table/toast_helper.c)

Поиск
Список
Период
Сортировка
От Dong Wook Lee
Тема Re: [PATCH] Improve function toast_delete_external (src/backend/access/table/toast_helper.c)
Дата
Msg-id CAAcByaJJBJU_y9gGiSTtjeTEshE=Ovv-VuedvFfC4paJSKHkeg@mail.gmail.com
обсуждение исходный текст
Ответ на [PATCH] Improve function toast_delete_external (src/backend/access/table/toast_helper.c)  (Ranier Vilela <ranier.vf@gmail.com>)
Ответы Re: [PATCH] Improve function toast_delete_external (src/backend/access/table/toast_helper.c)
Список pgsql-hackers
Yes, now I understand it.
Thank you for letting me know about that.

Thanks.

2022년 2월 10일 (목) 00:39, Ranier Vilela <ranier.vf@gmail.com>님이 작성:

Em qua., 9 de fev. de 2022 às 11:34, Dong Wook Lee <sh95119@gmail.com> escreveu:
Hi,

I've applied your patch. I think it's reasonable.
but  IMHO It looks more complicated to read because of many conditions
in if statement.
so what about just moving up if-statement?

No.
Your version is worse than HEAD, please don't.

1. Do not declare variables after statement.
Although Postgres accepts C99, this is not acceptable, for a number of problems, already discussed.

2. Still slow unnecessarily, because still test TupleDescAttr(tupleDesc, i)->attlen,
which is much more onerous than test isnull.

3. We don't write Baby C code.
C has short break expressions, use-it!

My version is the right thing, here.

regards,
Ranier Vilela

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

Предыдущее
От: Justin Pryzby
Дата:
Сообщение: Re: wrong fds used for refilenodes after pg_upgrade relfilenode changes Reply-To:
Следующее
От: Andres Freund
Дата:
Сообщение: Re: wrong fds used for refilenodes after pg_upgrade relfilenode changes