mirror of
https://github.com/postgres/postgres.git
synced 2025-10-25 13:17:41 +03:00
Extend r-tree operator classes to handle Y-direction tests equivalent
to the existing X-direction tests. An rtree class now includes 4 actual 2-D tests, 4 1-D X-direction tests, and 4 1-D Y-direction tests. This involved adding four new Y-direction test operators for each of box and polygon; I followed the PostGIS project's lead as to the names of these operators. NON BACKWARDS COMPATIBLE CHANGE: the poly_overleft (&<) and poly_overright (&>) operators now have semantics comparable to box_overleft and box_overright. This is necessary to make r-tree indexes work correctly on polygons. Also, I changed circle_left and circle_right to agree with box_left and box_right --- formerly they allowed the boundaries to touch. This isn't actually essential given the lack of any r-tree opclass for circles, but it seems best to sync all the definitions while we are at it.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/access/rtree.h,v 1.40 2005/06/24 00:18:52 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/include/access/rtree.h,v 1.41 2005/06/24 20:53:31 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "utils/rel.h"
|
||||
|
||||
/* see rtstrat.c for what all this is about */
|
||||
#define RTNStrategies 8
|
||||
#define RTNStrategies 12
|
||||
#define RTLeftStrategyNumber 1
|
||||
#define RTOverLeftStrategyNumber 2
|
||||
#define RTOverlapStrategyNumber 3
|
||||
@@ -30,6 +30,10 @@
|
||||
#define RTSameStrategyNumber 6
|
||||
#define RTContainsStrategyNumber 7
|
||||
#define RTContainedByStrategyNumber 8
|
||||
#define RTOverBelowStrategyNumber 9
|
||||
#define RTBelowStrategyNumber 10
|
||||
#define RTAboveStrategyNumber 11
|
||||
#define RTOverAboveStrategyNumber 12
|
||||
|
||||
#define RTNProcs 3
|
||||
#define RT_UNION_PROC 1
|
||||
|
||||
Reference in New Issue
Block a user