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

From Tom Lane
Subject Re: PG_FREE_IF_COPY extraneous in numeric_cmp?
Date
Msg-id 1060531.1677276976@sss.pgh.pa.us
Whole thread Raw
In response to PG_FREE_IF_COPY extraneous in numeric_cmp?  (CK Tan <cktan@vitessedata.com>)
Responses Re: PG_FREE_IF_COPY extraneous in numeric_cmp?
List pgsql-hackers
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: Heikki Linnakangas
Date:
Subject: Re: BRIN indexes vs. SK_SEARCHARRAY (and preprocessing scan keys)
Next
From: Corey Huinker
Date:
Subject: Re: verbose mode for pg_input_error_message?