summaryrefslogtreecommitdiff
path: root/src/include/utils
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2015-05-05 15:22:24 -0300
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2015-05-05 15:22:24 -0300
commit3b6db1f445e14bd189ebc99ce1e5535a1c624613 (patch)
tree0b2f037f21af6ed3ae5334c29491bc9ebe5f8e3f /src/include/utils
parent456ff0863851d70dce679ca3f631392589e31a33 (diff)
downloadpostgresql-3b6db1f445e14bd189ebc99ce1e5535a1c624613.tar.gz
Add geometry/range functions to support BRIN inclusion
This commit adds the following functions: box(point) -> box bound_box(box, box) -> box inet_same_family(inet, inet) -> bool inet_merge(inet, inet) -> cidr range_merge(anyrange, anyrange) -> anyrange The first of these is also used to implement a new assignment cast from point to box. These functions are the first part of a base to implement an "inclusion" operator class for BRIN, for multidimensional data types. Author: Emre Hasegeli Reviewed by: Andreas Karlsson
Diffstat (limited to 'src/include/utils')
-rw-r--r--src/include/utils/builtins.h2
-rw-r--r--src/include/utils/geo_decls.h2
-rw-r--r--src/include/utils/rangetypes.h1
3 files changed, 5 insertions, 0 deletions
diff --git a/src/include/utils/builtins.h b/src/include/utils/builtins.h
index 33a453f602..e8104f01a1 100644
--- a/src/include/utils/builtins.h
+++ b/src/include/utils/builtins.h
@@ -942,6 +942,8 @@ extern Datum inetpl(PG_FUNCTION_ARGS);
extern Datum inetmi_int8(PG_FUNCTION_ARGS);
extern Datum inetmi(PG_FUNCTION_ARGS);
extern void clean_ipv6_addr(int addr_family, char *addr);
+extern Datum inet_same_family(PG_FUNCTION_ARGS);
+extern Datum inet_merge(PG_FUNCTION_ARGS);
/* mac.c */
extern Datum macaddr_in(PG_FUNCTION_ARGS);
diff --git a/src/include/utils/geo_decls.h b/src/include/utils/geo_decls.h
index 2a91620db7..4377baa645 100644
--- a/src/include/utils/geo_decls.h
+++ b/src/include/utils/geo_decls.h
@@ -302,6 +302,8 @@ extern Datum box_add(PG_FUNCTION_ARGS);
extern Datum box_sub(PG_FUNCTION_ARGS);
extern Datum box_mul(PG_FUNCTION_ARGS);
extern Datum box_div(PG_FUNCTION_ARGS);
+extern Datum point_box(PG_FUNCTION_ARGS);
+extern Datum boxes_bound_box(PG_FUNCTION_ARGS);
/* public path routines */
extern Datum path_area(PG_FUNCTION_ARGS);
diff --git a/src/include/utils/rangetypes.h b/src/include/utils/rangetypes.h
index 43c80f493c..00a3efedc6 100644
--- a/src/include/utils/rangetypes.h
+++ b/src/include/utils/rangetypes.h
@@ -211,6 +211,7 @@ extern Datum range_gist_compress(PG_FUNCTION_ARGS);
extern Datum range_gist_decompress(PG_FUNCTION_ARGS);
extern Datum range_gist_fetch(PG_FUNCTION_ARGS);
extern Datum range_gist_union(PG_FUNCTION_ARGS);
+extern Datum range_merge(PG_FUNCTION_ARGS);
extern Datum range_gist_penalty(PG_FUNCTION_ARGS);
extern Datum range_gist_picksplit(PG_FUNCTION_ARGS);
extern Datum range_gist_same(PG_FUNCTION_ARGS);