aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/geo_ops.c
diff options
context:
space:
mode:
authorTomas Vondra <tomas.vondra@postgresql.org>2018-07-29 03:30:48 +0200
committerTomas Vondra <tomas.vondra@postgresql.org>2018-07-29 03:30:48 +0200
commit6bf0bc842bd75877e31727eb559c6a69e237f831 (patch)
treeff722cf14f3bc7338d91ea219041d362c9c56d7b /src/backend/utils/adt/geo_ops.c
parenta7dc63d904a6044d299aebdf59ad3199b6a9e99d (diff)
downloadpostgresql-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/backend/utils/adt/geo_ops.c')
-rw-r--r--src/backend/utils/adt/geo_ops.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/backend/utils/adt/geo_ops.c b/src/backend/utils/adt/geo_ops.c
index 3e7519015d2..1fb2ff2603c 100644
--- a/src/backend/utils/adt/geo_ops.c
+++ b/src/backend/utils/adt/geo_ops.c
@@ -21,13 +21,10 @@
#include "libpq/pqformat.h"
#include "miscadmin.h"
-#include "utils/builtins.h"
+#include "utils/float.h"
+#include "utils/fmgrprotos.h"
#include "utils/geo_decls.h"
-#ifndef M_PI
-#define M_PI 3.14159265358979323846
-#endif
-
/*
* Internal routines