pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Convert *GetDatum() and DatumGet*() macros to inline functions
Date: Mon, 12 Sep 2022 15:58:44 +0000
Message-ID: <E1oXlpc-0001mG-6q@gemulon.postgresql.org> (raw)

Convert *GetDatum() and DatumGet*() macros to inline functions

The previous macro implementations just cast the argument to a target
type but did not check whether the input type was appropriate.  The
function implementation can do better type checking of the input type.

Reviewed-by: Aleksander Alekseev <aleksander@timescale.com>
Discussion: https://www.postgresql.org/message-id/flat/8528fb7e-0aa2-6b54-85fb-0c0886dbd6ed%40enterprisedb.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/595836e99bf1ee6d43405b885fb69bb8c6d3ee23

Modified Files
--------------
contrib/intarray/_int_gist.c        |   2 +-
doc/src/sgml/xfunc.sgml             |   2 +-
src/backend/access/gist/gistutil.c  |   2 +-
src/backend/tsearch/ts_parse.c      |   4 +-
src/backend/utils/mb/mbutils.c      |  12 +-
src/include/access/gin.h            |  14 +-
src/include/funcapi.h               |  14 +-
src/include/postgres.h              | 275 +++++++++++++++++++++++++-----------
src/include/tsearch/ts_type.h       |  46 ++++--
src/include/tsearch/ts_utils.h      |  14 +-
src/include/utils/cash.h            |  14 +-
src/include/utils/date.h            |  42 +++++-
src/include/utils/expandeddatum.h   |  13 +-
src/include/utils/expandedrecord.h  |  16 ++-
src/include/utils/geo_decls.h       |  98 ++++++++++---
src/include/utils/inet.h            |  49 ++++++-
src/include/utils/jsonb.h           |  31 ++--
src/include/utils/jsonpath.h        |  14 +-
src/include/utils/multirangetypes.h |  23 ++-
src/include/utils/numeric.h         |  21 ++-
src/include/utils/pg_lsn.h          |  13 +-
src/include/utils/rangetypes.h      |  23 ++-
src/include/utils/timestamp.h       |  44 ++++--
src/include/utils/uuid.h            |  15 +-
src/include/utils/varbit.h          |  21 ++-
src/include/utils/xid8.h            |  14 +-
src/include/utils/xml.h             |  13 +-
27 files changed, 659 insertions(+), 190 deletions(-)



view thread (2+ messages)  latest in thread

Message-ID: <E1oXlpc-0001mG-6q@gemulon.postgresql.org>
Permalink:  ../E1oXlpc-0001mG-6q@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1oXlpc-0001mG-6q@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: peter@eisentraut.org
  Subject: Re: pgsql: Convert *GetDatum() and DatumGet*() macros to inline functions
  In-Reply-To: <E1oXlpc-0001mG-6q@gemulon.postgresql.org>
  References: <E1oXlpc-0001mG-6q@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox