/usr/share/postgresql/9.4/contrib/postgis-2.1/legacy_minimal.sql is in postgresql-9.4-postgis-scripts 2.1.4+dfsg-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | -- $Id: legacy_minimal.sql.in 11175 2013-03-18 17:20:18Z strk $
-- Bare minimum Legacy functions --
-- This file that contains what we have determined are
-- the most common functions used by older apps
-- You should be able to get by with just to support
-- older versions of mapserver, geoserver, qgis, gdal, openjump etc.
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION AsBinary(geometry)
RETURNS bytea
AS '$libdir/postgis-2.1','LWGEOM_asBinary'
LANGUAGE 'c' IMMUTABLE STRICT;
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION AsBinary(geometry,text)
RETURNS bytea
AS '$libdir/postgis-2.1','LWGEOM_asBinary'
LANGUAGE 'c' IMMUTABLE STRICT;
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION AsText(geometry)
RETURNS TEXT
AS '$libdir/postgis-2.1','LWGEOM_asText'
LANGUAGE 'c' IMMUTABLE STRICT;
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION Estimated_Extent(text,text,text) RETURNS box2d AS
'$libdir/postgis-2.1', 'geometry_estimated_extent'
LANGUAGE 'c' IMMUTABLE STRICT SECURITY DEFINER;
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION Estimated_Extent(text,text) RETURNS box2d AS
'$libdir/postgis-2.1', 'geometry_estimated_extent'
LANGUAGE 'c' IMMUTABLE STRICT SECURITY DEFINER;
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION GeomFromText(text, int4)
RETURNS geometry AS 'SELECT ST_GeomFromText($1, $2)'
LANGUAGE 'sql' IMMUTABLE STRICT;
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION GeomFromText(text)
RETURNS geometry AS 'SELECT ST_GeomFromText($1)'
LANGUAGE 'sql' IMMUTABLE STRICT;
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION ndims(geometry)
RETURNS smallint
AS '$libdir/postgis-2.1', 'LWGEOM_ndims'
LANGUAGE 'c' IMMUTABLE STRICT;
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION SetSRID(geometry,int4)
RETURNS geometry
AS '$libdir/postgis-2.1','LWGEOM_set_srid'
LANGUAGE 'c' IMMUTABLE STRICT;
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION SRID(geometry)
RETURNS int4
AS '$libdir/postgis-2.1','LWGEOM_get_srid'
LANGUAGE 'c' IMMUTABLE STRICT;
-- Deprecation in 1.5.0
-- hack to allow unknown to cast to geometry
-- so does not yield function is not unique
CREATE OR REPLACE FUNCTION ST_AsBinary(text)
RETURNS bytea
AS
$$ SELECT ST_AsBinary($1::geometry);$$
LANGUAGE 'sql' IMMUTABLE STRICT;
-- Deprecation in 1.5.0
-- hack to allow unknown to cast to geometry
-- so does not yield function is not unique
CREATE OR REPLACE FUNCTION ST_AsText(bytea)
RETURNS text
AS
$$ SELECT ST_AsText($1::geometry);$$
LANGUAGE 'sql' IMMUTABLE STRICT;
|