Re: Renaming PG_GETARG functions (was Re: PG_GETARG_GISTENTRY?)
Mark Dilger <hornschnorter@gmail.com>
From: Mark Dilger <hornschnorter@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>,
Andres Freund <andres@anarazel.de>,
"pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2017-09-12T22:16:01Z
Lists: pgsql-hackers
> On Sep 12, 2017, at 1:07 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > > [ changing subject line to possibly draw more attention ] > > Mark Dilger <hornschnorter@gmail.com> writes: >>> On Apr 5, 2017, at 9:23 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote: >>> In short, if you are supposed to write >>> FOO *val = PG_GETARG_FOO(n); >>> then the macro designer blew it, because the name implies that it >>> returns FOO, not pointer to FOO. This should be >>> FOO *val = PG_GETARG_FOO_P(n); > >> I have written a patch to fix these macro definitions across src/ and >> contrib/. > Thanks, Tom, for reviewing my patch.
Commits
-
Make DatumGetFoo/PG_GETARG_FOO/PG_RETURN_FOO macro names more consistent.
- 4bd1994650fd 11.0 landed
-
Use wrappers of PG_DETOAST_DATUM_PACKED() more.
- 3a0d473192b2 10.0 cited
-
Recommend wrappers of PG_DETOAST_DATUM_PACKED().
- 9d7726c2ba06 10.0 cited