Re: PG_FREE_IF_COPY extraneous in numeric_cmp? - Mailing list pgsql-hackers

From CK Tan
Subject Re: PG_FREE_IF_COPY extraneous in numeric_cmp?
Date
Msg-id CAJNt7=aMV=3rmF1V_JGNyeWsoKNOiy5jrkDDzQx1Md7NEXA+fg@mail.gmail.com
Whole thread Raw
In response to Re: PG_FREE_IF_COPY extraneous in numeric_cmp?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Thanks!

On Fri, Feb 24, 2023 at 2:16 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> CK Tan <cktan@vitessedata.com> writes:
> > Isn't it true that pfree() will never be called by PG_FREE_IF_COPY?
>
> No.  You're forgetting the possibility that PG_GETARG_NUMERIC will
> have to de-toast a toasted input.  Granted, numerics are seldom
> going to be long enough to get compressed or pushed out-of-line;
> but that's possible, and what's very possible is that they'll have
> a short header.
>
>                         regards, tom lane



pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: BRIN indexes vs. SK_SEARCHARRAY (and preprocessing scan keys)
Next
From: Pavel Stehule
Date:
Subject: broken formatting?