pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomas Vondra <tomas.vondra@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Provide separate header file for built-in float types
Date: Sun, 29 Jul 2018 01:43:52 +0000
Message-ID: <E1fjakS-0002PG-Kh@gemulon.postgresql.org> (raw)

Provide separate header file for built-in float types

Some data types under adt/ have separate header files, but most simple
ones do not, and their public functions are defined in builtins.h.  As
the patches improving geometric types will require making additional
functions public, this seems like a good opportunity to create a header
for floats types.

Commit 1acf757255 made _cmp functions public to solve NaN issues locally
for GiST indexes.  This patch reworks it in favour of a more widely
applicable API.  The API uses inline functions, as they are easier to
use compared to macros, and avoid double-evaluation hazards.

Author: Emre Hasegeli
Reviewed-by: Kyotaro Horiguchi

Discussion: https://www.postgresql.org/message-id/CAE2gYzxF7-5djV6-cEvqQu-fNsnt%3DEqbOURx7ZDg%2BVv6ZMTWbg%40mail...

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/6bf0bc842bd75877e31727eb559c6a69e237f831

Modified Files
--------------
contrib/btree_gin/btree_gin.c                 |   1 +
contrib/btree_gist/btree_ts.c                 |   1 +
contrib/cube/cube.c                           |   2 +-
contrib/cube/cubeparse.y                      |   2 +-
contrib/postgres_fdw/postgres_fdw.c           |   1 +
src/backend/access/gist/gistget.c             |   2 +-
src/backend/access/gist/gistproc.c            |  56 ++-
src/backend/access/gist/gistutil.c            |   2 +-
src/backend/utils/adt/float.c                 | 589 ++++++--------------------
src/backend/utils/adt/formatting.c            |   1 +
src/backend/utils/adt/geo_ops.c               |   7 +-
src/backend/utils/adt/geo_spgist.c            |   3 +-
src/backend/utils/adt/numeric.c               |   1 +
src/backend/utils/adt/rangetypes_gist.c       |   3 +-
src/backend/utils/adt/rangetypes_selfuncs.c   |   3 +-
src/backend/utils/adt/rangetypes_typanalyze.c |   3 +-
src/backend/utils/adt/timestamp.c             |   1 +
src/backend/utils/misc/guc.c                  |   1 +
src/include/utils/builtins.h                  |  14 -
src/include/utils/float.h                     | 376 ++++++++++++++++
20 files changed, 556 insertions(+), 513 deletions(-)



view thread (2+ messages)  latest in thread

Message-ID: <E1fjakS-0002PG-Kh@gemulon.postgresql.org>
Permalink:  ../E1fjakS-0002PG-Kh@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1fjakS-0002PG-Kh@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: tomas.vondra@postgresql.org
  Subject: Re: pgsql: Provide separate header file for built-in float types
  In-Reply-To: <E1fjakS-0002PG-Kh@gemulon.postgresql.org>
  References: <E1fjakS-0002PG-Kh@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