CK Tan <cktan(at)vitessedata(dot)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