Code cleanup for detoast a expanded datum.

From: Andy Fan <zhihuifan1213(at)163(dot)com>
To: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Code cleanup for detoast a expanded datum.
Date: 2024-11-19 02:57:17
Message-ID: 87v7wk7wxe.fsf@163.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hi,

When detoasting an expanded datum in detoast_attr, we already know it is
an expanded datum, but we use deotast_external_attr function which checks
VARATT_IS_EXTERNAL_ONDISK & VARATT_IS_EXTERNAL_INDIRECT again which I
think it is impossible to true in this case. so I think we should use a
more specific code to handle this, see the attached patch.

We already have lots of kind of toast type and some of checks have
overlap, this cleanup should make people less confused when reading this
code.

make check-world passed after applying this patch.

Any thought?

--
Best Regards
Andy Fan

Attachment Content-Type Size
v1-0001-Using-more-specific-code-when-detoasting-an-expan.patch text/x-diff 1.7 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2024-11-19 03:07:40 Re: Doc: typo in config.sgml
Previous Message Yugo NAGATA 2024-11-19 02:29:07 Re: Doc: typo in config.sgml