[postgis-tickets] [SCM] PostGIS branch stable-3.3 updated. 3.3.4-10-gae0e17c05
git at osgeo.org
git at osgeo.org
Mon Aug 14 12:47:56 PDT 2023
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".
The branch, stable-3.3 has been updated
via ae0e17c05f15f67e2544a71a21f4ae4421ce4b2e (commit)
via 3b12c65d7fc74e5fe0ba955b06c6d8e855850d82 (commit)
from 1218c1f1c8aed444ec850c9121d457edd5de2a84 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit ae0e17c05f15f67e2544a71a21f4ae4421ce4b2e
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Mon Aug 14 12:47:47 2023 -0700
Revert "Entry for #5175"
This reverts commit 1218c1f1c8aed444ec850c9121d457edd5de2a84.
diff --git a/NEWS b/NEWS
index c8bf3c765..57ded465a 100644
--- a/NEWS
+++ b/NEWS
@@ -5,8 +5,6 @@ YYYY/MM/DD
- #5442, [postgis_tiger_geocoder,postgis_topology]
Database search_path does not do
what it intends to do (Jelte Fennema)
- - #5175, Remove warning 'operator is not unique' for
- geometry != geometry (Paul Ramsey)
PostGIS 3.3.4
2023/07/28
commit 3b12c65d7fc74e5fe0ba955b06c6d8e855850d82
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Mon Aug 14 12:47:38 2023 -0700
Revert "Add an explicit <> operator, closes #5175"
This reverts commit 71fefd690fbc887a7399518ea56f17797faf1c11.
diff --git a/postgis/lwgeom_btree.c b/postgis/lwgeom_btree.c
index df3fee1f6..bf3dd4922 100644
--- a/postgis/lwgeom_btree.c
+++ b/postgis/lwgeom_btree.c
@@ -43,7 +43,6 @@
Datum lwgeom_lt(PG_FUNCTION_ARGS);
Datum lwgeom_le(PG_FUNCTION_ARGS);
Datum lwgeom_eq(PG_FUNCTION_ARGS);
-Datum lwgeom_neq(PG_FUNCTION_ARGS);
Datum lwgeom_ge(PG_FUNCTION_ARGS);
Datum lwgeom_gt(PG_FUNCTION_ARGS);
Datum lwgeom_cmp(PG_FUNCTION_ARGS);
@@ -56,7 +55,10 @@ Datum lwgeom_lt(PG_FUNCTION_ARGS)
int cmp = gserialized_cmp(g1, g2);
PG_FREE_IF_COPY(g1, 0);
PG_FREE_IF_COPY(g2, 1);
- PG_RETURN_BOOL(cmp < 0);
+ if (cmp < 0)
+ PG_RETURN_BOOL(true);
+ else
+ PG_RETURN_BOOL(false);
}
PG_FUNCTION_INFO_V1(lwgeom_le);
@@ -67,7 +69,10 @@ Datum lwgeom_le(PG_FUNCTION_ARGS)
int cmp = gserialized_cmp(g1, g2);
PG_FREE_IF_COPY(g1, 0);
PG_FREE_IF_COPY(g2, 1);
- PG_RETURN_BOOL(cmp <= 0);
+ if (cmp <= 0)
+ PG_RETURN_BOOL(true);
+ else
+ PG_RETURN_BOOL(false);
}
PG_FUNCTION_INFO_V1(lwgeom_eq);
@@ -78,18 +83,10 @@ Datum lwgeom_eq(PG_FUNCTION_ARGS)
int cmp = gserialized_cmp(g1, g2);
PG_FREE_IF_COPY(g1, 0);
PG_FREE_IF_COPY(g2, 1);
- PG_RETURN_BOOL(cmp == 0);
-}
-
-PG_FUNCTION_INFO_V1(lwgeom_neq);
-Datum lwgeom_neq(PG_FUNCTION_ARGS)
-{
- GSERIALIZED *g1 = PG_GETARG_GSERIALIZED_P(0);
- GSERIALIZED *g2 = PG_GETARG_GSERIALIZED_P(1);
- int cmp = gserialized_cmp(g1, g2);
- PG_FREE_IF_COPY(g1, 0);
- PG_FREE_IF_COPY(g2, 1);
- PG_RETURN_BOOL(cmp != 0);
+ if (cmp == 0)
+ PG_RETURN_BOOL(true);
+ else
+ PG_RETURN_BOOL(false);
}
PG_FUNCTION_INFO_V1(lwgeom_ge);
@@ -100,7 +97,10 @@ Datum lwgeom_ge(PG_FUNCTION_ARGS)
int cmp = gserialized_cmp(g1, g2);
PG_FREE_IF_COPY(g1, 0);
PG_FREE_IF_COPY(g2, 1);
- PG_RETURN_BOOL(cmp >= 0);
+ if (cmp >= 0)
+ PG_RETURN_BOOL(true);
+ else
+ PG_RETURN_BOOL(false);
}
PG_FUNCTION_INFO_V1(lwgeom_gt);
@@ -111,7 +111,10 @@ Datum lwgeom_gt(PG_FUNCTION_ARGS)
int cmp = gserialized_cmp(g1, g2);
PG_FREE_IF_COPY(g1, 0);
PG_FREE_IF_COPY(g2, 1);
- PG_RETURN_BOOL(cmp > 0);
+ if (cmp > 0)
+ PG_RETURN_BOOL(true);
+ else
+ PG_RETURN_BOOL(false);
}
PG_FUNCTION_INFO_V1(lwgeom_cmp);
diff --git a/postgis/postgis.sql.in b/postgis/postgis.sql.in
index cd6750f85..88a246d33 100644
--- a/postgis/postgis.sql.in
+++ b/postgis/postgis.sql.in
@@ -398,12 +398,6 @@ CREATE OR REPLACE FUNCTION geometry_eq(geom1 geometry, geom2 geometry)
LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
_COST_DEFAULT;
-CREATE OR REPLACE FUNCTION geometry_neq(geom1 geometry, geom2 geometry)
- RETURNS bool
- AS 'MODULE_PATHNAME', 'lwgeom_neq'
- LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
- _COST_DEFAULT;
-
CREATE OR REPLACE FUNCTION geometry_cmp(geom1 geometry, geom2 geometry)
RETURNS integer
AS 'MODULE_PATHNAME', 'lwgeom_cmp'
@@ -437,14 +431,7 @@ CREATE OPERATOR <= (
-- Availability: 0.9.0
CREATE OPERATOR = (
LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = geometry_eq,
- COMMUTATOR = '=', NEGATOR = '<>',
- RESTRICT = contsel, JOIN = contjoinsel, HASHES, MERGES
-);
-
--- Availability: 3.5.0
-CREATE OPERATOR <> (
- LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = geometry_neq,
- COMMUTATOR = '<>', NEGATOR = '=',
+ COMMUTATOR = '=', -- we might implement a faster negator here
RESTRICT = contsel, JOIN = contjoinsel, HASHES, MERGES
);
-----------------------------------------------------------------------
Summary of changes:
NEWS | 2 --
postgis/lwgeom_btree.c | 37 ++++++++++++++++++++-----------------
postgis/postgis.sql.in | 15 +--------------
3 files changed, 21 insertions(+), 33 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list