Recommend wrappers of PG_DETOAST_DATUM_PACKED() - Mailing list pgsql-hackers

From Noah Misch
Subject Recommend wrappers of PG_DETOAST_DATUM_PACKED()
Date
Msg-id 20161025145724.GA1547663@tornado.leadboat.com
Whole thread Raw
Responses Re: Recommend wrappers of PG_DETOAST_DATUM_PACKED()  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: [HACKERS] Recommend wrappers of PG_DETOAST_DATUM_PACKED()  (Noah Misch <noah@leadboat.com>)
List pgsql-hackers
When commit 3e23b68dac006e8deb0afa327e855258df8de064 introduced single-byte
varlena headers, its fmgr.h changes presented PG_GETARG_TEXT_PP() and
PG_GETARG_TEXT_P() as equals.  Its postgres.h changes presented
PG_DETOAST_DATUM_PACKED() and VARDATA_ANY() as the exceptional case.  Let's
firmly recommend PG_GETARG_TEXT_PP() over PG_GETARG_TEXT_P(); likewise for
other ...PP() macros.  This shaves cycles and brings consistency of style.

If the attached policy-setting patch seems reasonable, I will follow it with a
mechanical patch adopting the recommended macros throughout the tree.  (If any
code does want the alignment it gets from an obsolecent macro, I will add a
comment to that code.)

Thanks,
nm

Attachment

pgsql-hackers by date:

Previous
From: Julian Markwort
Date:
Subject: Re: [PATCH] pgpassfile connection option
Next
From: Tom Lane
Date:
Subject: Re: Recommend wrappers of PG_DETOAST_DATUM_PACKED()