Lists: | pgsql-committers |
---|
From: | Tomas Vondra <tomas(dot)vondra(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Provide separate header file for built-in float types |
Date: | 2018-07-29 01:43:52 |
Message-ID: | [email protected] |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-committers |
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
Branch
------
master
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(-)
From: | Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> |
---|---|
To: | Tomas Vondra <tomas(dot)vondra(at)postgresql(dot)org> |
Cc: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | Re: pgsql: Provide separate header file for built-in float types |
Date: | 2018-08-07 07:03:21 |
Message-ID: | CAEZATCW=K4gJgGjEwnp4GiVtitd8dOoh2DBjuSWN2VGyP6vt_Q@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-committers |
On 29 July 2018 at 02:43, Tomas Vondra <tomas(dot)vondra(at)postgresql(dot)org> wrote:
> Provide separate header file for built-in float types
It looks like this commit broke float8_accum() and float4_accum() when
not invoked as aggregates (transdatums is no longer being populated).
Possibly it would be worth having regression tests for those, to be safe.
Regards,
Dean