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: Fix incorrect uses of Datum conversion macros
Date: Mon, 05 Sep 2022 11:31:53 +0000
Message-ID: <E1oVAKX-001YCT-57@gemulon.postgresql.org> (raw)

Fix incorrect uses of Datum conversion macros

Since these macros just cast whatever you give them to the designated
output type, and many normal uses also cast the output type further, a
number of incorrect uses go undiscovered.  The fixes in this patch
have been discovered by changing these macros to inline functions,
which is the subject of a future patch.

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/6bcda4a72123c3aa29fa3f03d952095675ad4468

Modified Files
--------------
contrib/btree_gist/btree_utils_num.c          |  2 +-
contrib/dblink/dblink.c                       |  2 +-
contrib/hstore/hstore_op.c                    |  2 +-
contrib/pageinspect/heapfuncs.c               |  4 ++--
src/backend/access/brin/brin_bloom.c          |  2 +-
src/backend/access/brin/brin_minmax_multi.c   | 12 ++++++------
src/backend/access/common/toast_compression.c |  2 +-
src/backend/access/table/toast_helper.c       |  2 +-
src/backend/access/transam/xlogfuncs.c        |  2 +-
src/backend/statistics/mcv.c                  |  4 ++--
src/backend/utils/adt/amutils.c               |  2 +-
src/backend/utils/adt/multirangetypes.c       |  2 +-
src/backend/utils/adt/pg_lsn.c                |  4 ++--
src/backend/utils/adt/pgstatfuncs.c           |  2 +-
src/backend/utils/adt/rangetypes_spgist.c     |  4 ++--
src/backend/utils/adt/regexp.c                |  2 +-
src/backend/utils/adt/tsgistidx.c             |  2 +-
src/backend/utils/adt/tsquery_op.c            |  2 +-
src/backend/utils/adt/varlena.c               |  2 +-
src/backend/utils/adt/xml.c                   |  2 +-
src/backend/utils/resowner/resowner.c         |  6 +++---
src/pl/plperl/plperl.c                        |  2 +-
22 files changed, 33 insertions(+), 33 deletions(-)



Message-ID: <E1oVAKX-001YCT-57@gemulon.postgresql.org>
Permalink:  ../E1oVAKX-001YCT-57@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1oVAKX-001YCT-57@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: Fix incorrect uses of Datum conversion macros
  In-Reply-To: <E1oVAKX-001YCT-57@gemulon.postgresql.org>
  References: <E1oVAKX-001YCT-57@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