diff options
author | Tomas Vondra <tomas.vondra@postgresql.org> | 2018-07-29 03:30:48 +0200 |
---|---|---|
committer | Tomas Vondra <tomas.vondra@postgresql.org> | 2018-07-29 03:30:48 +0200 |
commit | 6bf0bc842bd75877e31727eb559c6a69e237f831 (patch) | |
tree | ff722cf14f3bc7338d91ea219041d362c9c56d7b /src/include/utils/builtins.h | |
parent | a7dc63d904a6044d299aebdf59ad3199b6a9e99d (diff) | |
download | postgresql-6bf0bc842bd75877e31727eb559c6a69e237f831.tar.gz postgresql-6bf0bc842bd75877e31727eb559c6a69e237f831.zip |
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.gmail.com
Diffstat (limited to 'src/include/utils/builtins.h')
-rw-r--r-- | src/include/utils/builtins.h | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/include/utils/builtins.h b/src/include/utils/builtins.h index 88a42b345c1..6f55699912c 100644 --- a/src/include/utils/builtins.h +++ b/src/include/utils/builtins.h @@ -52,20 +52,6 @@ extern char *pg_ltostr_zeropad(char *str, int32 value, int32 minwidth); extern char *pg_ltostr(char *str, int32 value); extern uint64 pg_strtouint64(const char *str, char **endptr, int base); -/* float.c */ -extern PGDLLIMPORT int extra_float_digits; - -extern double get_float8_infinity(void); -extern float get_float4_infinity(void); -extern double get_float8_nan(void); -extern float get_float4_nan(void); -extern int is_infinite(double val); -extern double float8in_internal(char *num, char **endptr_p, - const char *type_name, const char *orig_string); -extern char *float8out_internal(double num); -extern int float4_cmp_internal(float4 a, float4 b); -extern int float8_cmp_internal(float8 a, float8 b); - /* oid.c */ extern oidvector *buildoidvector(const Oid *oids, int n); extern Oid oidparse(Node *node); |