From f03f7caa65d327c4f0921d496efa6058a4460214 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Wed, 19 Nov 2003 15:23:27 +0000 Subject: [PATCH] Fixed wrong COMMUTATOR specifications in '<','>','~=','@' operators, added new '<=', '>=' operators git-svn-id: http://svn.osgeo.org/postgis/trunk@367 b70326c6-7e19-0410-871a-916f4a2858ee --- Attic/postgis_sql_common.sql.in | 35 +++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/Attic/postgis_sql_common.sql.in b/Attic/postgis_sql_common.sql.in index 23ff59ed1..bc2784d2b 100644 --- a/Attic/postgis_sql_common.sql.in +++ b/Attic/postgis_sql_common.sql.in @@ -12,6 +12,10 @@ -- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- $Log$ +-- Revision 1.22 2003/11/19 15:23:27 strk +-- Fixed wrong COMMUTATOR specifications in '<','>','~=','@' operators, +-- added new '<=', '>=' operators +-- -- Revision 1.21 2003/11/13 13:14:49 strk -- used quote_ident() calls in AddGeometryColumns as suggested by Bernhard Herzog -- @@ -1199,13 +1203,13 @@ CREATE OPERATOR >> ( CREATE OPERATOR ~= ( LEFTARG = GEOMETRY, RIGHTARG = GEOMETRY, PROCEDURE = geometry_same, - COMMUTATOR = '=', + COMMUTATOR = '~=', RESTRICT = eqsel, JOIN = eqjoinsel ); CREATE OPERATOR @ ( LEFTARG = GEOMETRY, RIGHTARG = GEOMETRY, PROCEDURE = geometry_contained, - COMMUTATOR = '@', + COMMUTATOR = '~', RESTRICT = contsel, JOIN = contjoinsel ); @@ -1215,21 +1219,36 @@ CREATE OPERATOR ~ ( RESTRICT = contsel, JOIN = contjoinsel ); +-- +-- Sorting operators for Btree +-- + +CREATE OPERATOR < ( + LEFTARG = GEOMETRY, RIGHTARG = GEOMETRY, PROCEDURE = geometry_lt, + COMMUTATOR = '>', NEGATOR = '>=', + RESTRICT = contsel, JOIN = contjoinsel +); + +CREATE OPERATOR <= ( + LEFTARG = GEOMETRY, RIGHTARG = GEOMETRY, PROCEDURE = geometry_le, + COMMUTATOR = '>=', NEGATOR = '>', + RESTRICT = contsel, JOIN = contjoinsel +); + CREATE OPERATOR = ( LEFTARG = GEOMETRY, RIGHTARG = GEOMETRY, PROCEDURE = geometry_eq, - COMMUTATOR = '=', + COMMUTATOR = '=', -- we might implement a faster negator here RESTRICT = contsel, JOIN = contjoinsel ); -CREATE OPERATOR < ( - LEFTARG = GEOMETRY, RIGHTARG = GEOMETRY, PROCEDURE = geometry_lt, - COMMUTATOR = '<', +CREATE OPERATOR >= ( + LEFTARG = GEOMETRY, RIGHTARG = GEOMETRY, PROCEDURE = geometry_ge, + COMMUTATOR = '<=', NEGATOR = '<', RESTRICT = contsel, JOIN = contjoinsel ); - CREATE OPERATOR > ( LEFTARG = GEOMETRY, RIGHTARG = GEOMETRY, PROCEDURE = geometry_gt, - COMMUTATOR = '>', + COMMUTATOR = '<', NEGATOR = '<=', RESTRICT = contsel, JOIN = contjoinsel ); -- 2.40.0