Additional features enabled if you are running Proj6+ and PostgreSQL 12
* Major highlights *
- - #4433 32-bit hash fix (requires reindexing hash(geometry) indexes) (Raúl Marín)
+ - #4433, 32-bit hash fix (requires reindexing hash(geometry) indexes) (Raúl Marín)
- #4445, Fix a bug in geometry_le (Raúl Marín)
- #4451, Fix the calculation of gserialized_max_header_size (Raúl Marín)
- #4450, Speed up ST_GeometryType (Raúl Marín)
- #4417, Update spatial_ref_sys with new entries (Paul Ramsey)
- #4449, Speed up ST_X, ST_Y, ST_Z and ST_M (Raúl Marín)
- #4456, add Rasbery Pi 32-bit jenkins bot for testing (Bruce Rindahl)
+ - #4454, Speed up _ST_OrderingEquals (Raúl Marín)
PostGIS 3.0.0alpha3
2019/07/01
{
GSERIALIZED *g1 = PG_GETARG_GSERIALIZED_P(0);
GSERIALIZED *g2 = PG_GETARG_GSERIALIZED_P(1);
- LWGEOM *lwg1, *lwg2;
- bool result;
- if ((gserialized_get_type(g1) != gserialized_get_type(g2)) ||
- (gserialized_has_z(g1) != gserialized_has_z(g2)) ||
- (gserialized_has_m(g1) != gserialized_has_m(g2)))
- {
- PG_FREE_IF_COPY(g1, 0);
- PG_FREE_IF_COPY(g2, 1);
- PG_RETURN_BOOL(false); /* different type or dimensionality */
- }
-
- /* ok, deserialize. */
- lwg1 = lwgeom_from_gserialized(g1);
- lwg2 = lwgeom_from_gserialized(g2);
-
- /* invoke appropriate function */
- result = lwgeom_same(lwg1, lwg2);
-
- /* Release memory */
- lwgeom_free(lwg1);
- lwgeom_free(lwg2);
- PG_FREE_IF_COPY(g1, 0);
- PG_FREE_IF_COPY(g2, 1);
-
- PG_RETURN_BOOL(result);
+ PG_RETURN_BOOL(gserialized_cmp(g1, g2) == 0);
}
PG_FUNCTION_INFO_V1(ST_MakeEnvelope);