From 31e11e69616b2b1df84d8ce9b783912f1854c901 Mon Sep 17 00:00:00 2001 From: Regina Obe Date: Mon, 12 Dec 2011 12:17:21 +0000 Subject: [PATCH] reduce ST_MakeEnvelope down to one function but make srid default to 0 (would be nice if we defined an @SRID_UNKNOWN in the sqldefine.h.in so I don't have to hard code this). Get rid of other variant. changing to use default parameters doesn't seem to require dropping the function so only had to drop one of them git-svn-id: http://svn.osgeo.org/postgis/trunk@8358 b70326c6-7e19-0410-871a-916f4a2858ee --- postgis/postgis.sql.in.c | 9 ++------- postgis/postgis_drop_before.sql.in.c | 1 + 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/postgis/postgis.sql.in.c b/postgis/postgis.sql.in.c index 8ecc5e953..5a902c151 100644 --- a/postgis/postgis.sql.in.c +++ b/postgis/postgis.sql.in.c @@ -1125,13 +1125,8 @@ CREATE OR REPLACE FUNCTION ST_SetPoint(geometry, integer, geometry) LANGUAGE 'C' IMMUTABLE STRICT; -- Availability: 1.5.0 -CREATE OR REPLACE FUNCTION ST_MakeEnvelope(float8, float8, float8, float8, integer) - RETURNS geometry - AS 'MODULE_PATHNAME', 'ST_MakeEnvelope' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Availability: 2.0.0 -CREATE OR REPLACE FUNCTION ST_MakeEnvelope(float8, float8, float8, float8) +-- Availability: 2.0.0 - made srid optional +CREATE OR REPLACE FUNCTION ST_MakeEnvelope(float8, float8, float8, float8, integer DEFAULT 0) RETURNS geometry AS 'MODULE_PATHNAME', 'ST_MakeEnvelope' LANGUAGE 'C' IMMUTABLE STRICT; diff --git a/postgis/postgis_drop_before.sql.in.c b/postgis/postgis_drop_before.sql.in.c index c9d8f1b57..ff3d870e8 100644 --- a/postgis/postgis_drop_before.sql.in.c +++ b/postgis/postgis_drop_before.sql.in.c @@ -2,3 +2,4 @@ -- These are functions where the argument names may have changed -- -- so have to be dropped before upgrade can happen -- DROP FUNCTION IF EXISTS AddGeometryColumn(varchar,varchar,varchar,varchar,integer,varchar,integer,boolean); +DROP FUNCTION IF EXISTS ST_MakeEnvelope(float8, float8, float8, float8); -- 2.40.0