aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/geo_ops.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/utils/adt/geo_ops.c')
-rw-r--r--src/backend/utils/adt/geo_ops.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/backend/utils/adt/geo_ops.c b/src/backend/utils/adt/geo_ops.c
index 2eb72428819..35f1a13ab67 100644
--- a/src/backend/utils/adt/geo_ops.c
+++ b/src/backend/utils/adt/geo_ops.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/adt/geo_ops.c,v 1.106 2010/01/02 16:57:54 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/adt/geo_ops.c,v 1.107 2010/01/14 16:31:09 teodor Exp $
*
*-------------------------------------------------------------------------
*/
@@ -3202,6 +3202,16 @@ on_pb(PG_FUNCTION_ARGS)
pt->y <= box->high.y && pt->y >= box->low.y);
}
+Datum
+box_contain_pt(PG_FUNCTION_ARGS)
+{
+ BOX *box = PG_GETARG_BOX_P(0);
+ Point *pt = PG_GETARG_POINT_P(1);
+
+ PG_RETURN_BOOL(pt->x <= box->high.x && pt->x >= box->low.x &&
+ pt->y <= box->high.y && pt->y >= box->low.y);
+}
+
/* on_ppath -
* Whether a point lies within (on) a polyline.
* If open, we have to (groan) check each segment.