Re: Code cleanup for detoast a expanded datum.

From: Michel Pelletier <pelletier(dot)michel(at)gmail(dot)com>
To: Andy Fan <zhihuifan1213(at)163(dot)com>
Cc: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Code cleanup for detoast a expanded datum.
Date: 2024-12-01 17:38:04
Message-ID: CACxu=vKh-6mnsKr6y-eA_9hDYBVFDUQ9YyR=mxDd-dfirGQgBA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Nov 18, 2024 at 7:42 PM Andy Fan <zhihuifan1213(at)163(dot)com> wrote:

> Andy Fan <zhihuifan1213(at)163(dot)com> writes:
>
> >
> > make check-world passed after applying this patch.
>
> v2 changes the places of Assert, which is missed in v1 by mistakes.
>

I'm not an expert in this end of the code but it looks correct to me, my
only comment would be maybe add a new function
detoast_external_expanded_attr that is called from both
detoast_external_attr and detoast_attr so the EOHP stuff stays hidden
behind a function.

If that's too much API commitment then I'm fine with the way it looks
inlining the EOHP code as you have to avoid the duplicate checks.

-Michel

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andreas Karlsson 2024-12-01 17:47:20 INSERT ... ON CONFLICT DO SELECT [FOR ...] take 2
Previous Message Tom Lane 2024-12-01 17:22:09 Re: speedup ALTER TABLE ADD CHECK CONSTRAINT.