| From: | Noah Misch <noah(at)leadboat(dot)com> |
|---|---|
| To: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | Recommend wrappers of PG_DETOAST_DATUM_PACKED() |
| Date: | 2016-10-25 14:57:24 |
| Message-ID: | 20161025145724.GA1547663@tornado.leadboat.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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 | Content-Type | Size |
|---|---|---|
| unpack-char-varlena-deprecate-v2.patch | text/plain | 5.2 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2016-10-25 15:03:13 | Re: Recommend wrappers of PG_DETOAST_DATUM_PACKED() |
| Previous Message | Julian Markwort | 2016-10-25 13:50:12 | Re: [PATCH] pgpassfile connection option |