From 4cbe473938779ec414d90c2063c4398e68a70838 Mon Sep 17 00:00:00 2001 From: Teodor Sigaev Date: Thu, 14 Jan 2010 16:31:09 +0000 Subject: Add point_ops opclass for GiST. --- src/backend/utils/adt/geo_ops.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/backend/utils/adt/geo_ops.c') 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. -- cgit v1.2.3