Re: PG_GETARG_GISTENTRY?

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mark Dilger <hornschnorter@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>, Andres Freund <andres@anarazel.de>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2017-04-05T20:12:23Z
Lists: pgsql-hackers
Mark Dilger <hornschnorter@gmail.com> writes:
> I have written a patch to fix these macro definitions across src/ and contrib/.
> Find the patch, attached.  All regression tests pass on my Mac laptop.

Thanks for doing the legwork on that.  This seems a bit late for v10,
especially since it's only cosmetic, but please put it in the first
v11 commitfest.

> I don't find any inappropriate uses of _P where _PP would be called for.  I do,
> however, notice that some datatypes' functions are written to use PG_GETARG_*_P
> where PG_GETARG_*_PP might be more efficient.

Yeah.  I think Noah did some work in that direction already, but I don't
believe he claimed to have caught everything.  Feel free to push further.

			regards, tom lane


Commits

  1. Make DatumGetFoo/PG_GETARG_FOO/PG_RETURN_FOO macro names more consistent.

  2. Use wrappers of PG_DETOAST_DATUM_PACKED() more.

  3. Recommend wrappers of PG_DETOAST_DATUM_PACKED().