pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Provide separate header file for built-in float types
2+ messages / 2 participants
[nested] [flat]

* pgsql: Provide separate header file for built-in float types
@ 2018-07-29 01:43 Tomas Vondra <tomas.vondra@postgresql.org>
  2018-08-07 07:03 ` Re: pgsql: Provide separate header file for built-in float types Dean Rasheed <dean.a.rasheed@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Tomas Vondra @ 2018-07-29 01:43 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: pgsql: Provide separate header file for built-in float types
  2018-07-29 01:43 pgsql: Provide separate header file for built-in float types Tomas Vondra <tomas.vondra@postgresql.org>
@ 2018-08-07 07:03 ` Dean Rasheed <dean.a.rasheed@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Dean Rasheed @ 2018-08-07 07:03 UTC (permalink / raw)
  To: Tomas Vondra <tomas.vondra@postgresql.org>; +Cc: pgsql-committers@lists.postgresql.org

On 29 July 2018 at 02:43, Tomas Vondra <tomas.vondra@postgresql.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




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2018-08-07 07:03 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-07-29 01:43 pgsql: Provide separate header file for built-in float types Tomas Vondra <tomas.vondra@postgresql.org>
2018-08-07 07:03 ` Dean Rasheed <dean.a.rasheed@gmail.com>

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