#define CREATEFUNCTION CREATE OR REPLACE FUNCTION
+#if USE_VERSION > 72
+# define _IMMUTABLE_STRICT IMMUTABLE STRICT
+# define _IMMUTABLE IMMUTABLE
+# define _STABLE_STRICT STABLE STRICT
+# define _STABLE STABLE
+# define _VOLATILE_STRICT VOLATILE STRICT
+# define _VOLATILE VOLATILE
+# define _STRICT STRICT
+#else // USE_VERSION <= 72
+# define _IMMUTABLE_STRICT with(iscachable,isstrict)
+# define _IMMUTABLE with(iscachable)
+# define _STABLE_STRICT with(isstrict)
+# define _STABLE
+# define _VOLATILE_STRICT with(isstrict)
+# define _VOLATILE
+# define _STRICT with(isstrict)
+#endif // USE_VERSION <= 72
+
+
BEGIN;
-------------------------------------------------------------------
CREATEFUNCTION histogram2d_in(HISTOGRAM_OUT_REP)
RETURNS HISTOGRAM_IN_REP
AS '@MODULE_FILENAME@', 'lwhistogram2d_in'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION histogram2d_out(HISTOGRAM_IN_REP)
RETURNS HISTOGRAM_OUT_REP
AS '@MODULE_FILENAME@', 'lwhistogram2d_out'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATE TYPE histogram2d (
alignment = double,
CREATEFUNCTION spheroid_in(SPHEROID_OUT_REP)
RETURNS SPHEROID_IN_REP
AS '@MODULE_FILENAME@','ellipsoid_in'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION spheroid_out(SPHEROID_IN_REP)
RETURNS SPHEROID_OUT_REP
AS '@MODULE_FILENAME@','ellipsoid_out'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATE TYPE spheroid (
alignment = double,
CREATEFUNCTION geometry_in(GEOMETRY_OUT_REP)
RETURNS geometry
AS '@MODULE_FILENAME@','LWGEOM_in'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION geometry_out(GEOMETRY_IN_REP)
RETURNS cstring
AS '@MODULE_FILENAME@','LWGEOM_out'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
#if USE_VERSION >= 80
CREATEFUNCTION geometry_analyze(internal)
RETURNS bool
AS '@MODULE_FILENAME@', 'LWGEOM_analyze'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _VOLATILE_STRICT; -- WITH (isstrict);
#endif
#if USE_VERSION > 73
CREATEFUNCTION geometry_recv(internal)
RETURNS geometry
AS '@MODULE_FILENAME@','LWGEOM_recv'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION geometry_send(geometry)
RETURNS bytea
AS '@MODULE_FILENAME@','LWGEOM_send'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
#endif
CREATEFUNCTION box3d_in(BOX3D_OUT_REP)
RETURNS BOX3D_IN_REP
AS '@MODULE_FILENAME@', 'BOX3D_in'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION box3d_out(BOX3D_IN_REP)
RETURNS BOX3D_OUT_REP
AS '@MODULE_FILENAME@', 'BOX3D_out'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATE TYPE box3d (
alignment = double,
CREATEFUNCTION xmin(box3d)
RETURNS FLOAT8
AS '@MODULE_FILENAME@','BOX3D_xmin'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION ymin(box3d)
RETURNS FLOAT8
AS '@MODULE_FILENAME@','BOX3D_ymin'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION zmin(box3d)
RETURNS FLOAT8
AS '@MODULE_FILENAME@','BOX3D_zmin'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION xmax(box3d)
RETURNS FLOAT8
AS '@MODULE_FILENAME@','BOX3D_xmax'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION ymax(box3d)
RETURNS FLOAT8
AS '@MODULE_FILENAME@','BOX3D_ymax'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION zmax(box3d)
RETURNS FLOAT8
AS '@MODULE_FILENAME@','BOX3D_zmax'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
-------------------------------------------------------------------
-- CHIP TYPE
CREATEFUNCTION chip_in(CHIP_OUT_REP)
RETURNS CHIP_IN_REP
AS '@MODULE_FILENAME@','CHIP_in'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION chip_out(CHIP_IN_REP)
RETURNS CHIP_OUT_REP
AS '@MODULE_FILENAME@','CHIP_out'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATE TYPE chip (
alignment = double,
CREATEFUNCTION box2d_in(BOX2D_OUT_REP)
RETURNS box2d
AS '@MODULE_FILENAME@','BOX2DFLOAT4_in'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION box2d_out(BOX2D_IN_REP)
RETURNS cstring
AS '@MODULE_FILENAME@','BOX2DFLOAT4_out'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATE TYPE box2d (
internallength = 16,
CREATEFUNCTION box2d_overleft(box2d, box2d)
RETURNS bool
AS '@MODULE_FILENAME@', 'BOX2D_overleft'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION box2d_overright(box2d, box2d)
RETURNS bool
AS '@MODULE_FILENAME@', 'BOX2D_overright'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION box2d_left(box2d, box2d)
RETURNS bool
AS '@MODULE_FILENAME@', 'BOX2D_left'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION box2d_right(box2d, box2d)
RETURNS bool
AS '@MODULE_FILENAME@', 'BOX2D_right'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION box2d_contain(box2d, box2d)
RETURNS bool
AS '@MODULE_FILENAME@', 'BOX2D_contain'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION box2d_contained(box2d, box2d)
RETURNS bool
AS '@MODULE_FILENAME@', 'BOX2D_contained'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION box2d_overlap(box2d, box2d)
RETURNS bool
AS '@MODULE_FILENAME@', 'BOX2D_overlap'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION box2d_same(box2d, box2d)
RETURNS bool
AS '@MODULE_FILENAME@', 'BOX2D_same'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION box2d_intersects(box2d, box2d)
RETURNS bool
AS '@MODULE_FILENAME@', 'BOX2D_intersects'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION xmin(box2d)
RETURNS FLOAT4
AS '@MODULE_FILENAME@','BOX2DFLOAT4_xmin'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION ymin(box2d)
RETURNS FLOAT4
AS '@MODULE_FILENAME@','BOX2DFLOAT4_ymin'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION xmax(box2d)
RETURNS FLOAT4
AS '@MODULE_FILENAME@','BOX2DFLOAT4_xmax'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION ymax(box2d)
RETURNS FLOAT4
AS '@MODULE_FILENAME@','BOX2DFLOAT4_ymax'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
-- lwgeom operator support functions
CREATEFUNCTION geometry_lt(geometry, geometry)
RETURNS bool
AS '@MODULE_FILENAME@', 'lwgeom_lt'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION geometry_le(geometry, geometry)
RETURNS bool
AS '@MODULE_FILENAME@', 'lwgeom_le'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION geometry_gt(geometry, geometry)
RETURNS bool
AS '@MODULE_FILENAME@', 'lwgeom_gt'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION geometry_ge(geometry, geometry)
RETURNS bool
AS '@MODULE_FILENAME@', 'lwgeom_ge'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION geometry_eq(geometry, geometry)
RETURNS bool
AS '@MODULE_FILENAME@', 'lwgeom_eq'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION geometry_cmp(geometry, geometry)
RETURNS integer
AS '@MODULE_FILENAME@', 'lwgeom_cmp'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
--
-- Sorting operators for Btree
CREATEFUNCTION geometry_overleft(geometry, geometry)
RETURNS bool
AS '@MODULE_FILENAME@', 'LWGEOM_overleft'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION geometry_overright(geometry, geometry)
RETURNS bool
AS '@MODULE_FILENAME@', 'LWGEOM_overright'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION geometry_overabove(geometry, geometry)
RETURNS bool
AS '@MODULE_FILENAME@', 'LWGEOM_overabove'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION geometry_overbelow(geometry, geometry)
RETURNS bool
AS '@MODULE_FILENAME@', 'LWGEOM_overbelow'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION geometry_left(geometry, geometry)
RETURNS bool
AS '@MODULE_FILENAME@', 'LWGEOM_left'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION geometry_right(geometry, geometry)
RETURNS bool
AS '@MODULE_FILENAME@', 'LWGEOM_right'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION geometry_above(geometry, geometry)
RETURNS bool
AS '@MODULE_FILENAME@', 'LWGEOM_above'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION geometry_below(geometry, geometry)
RETURNS bool
AS '@MODULE_FILENAME@', 'LWGEOM_below'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION geometry_contain(geometry, geometry)
RETURNS bool
AS '@MODULE_FILENAME@', 'LWGEOM_contain'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION geometry_contained(geometry, geometry)
RETURNS bool
AS '@MODULE_FILENAME@', 'LWGEOM_contained'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION geometry_overlap(geometry, geometry)
RETURNS bool
AS '@MODULE_FILENAME@', 'LWGEOM_overlap'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION geometry_same(geometry, geometry)
RETURNS bool
AS '@MODULE_FILENAME@', 'LWGEOM_same'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
-- GEOMETRY operators
CREATEFUNCTION addBBOX(geometry)
RETURNS geometry
AS '@MODULE_FILENAME@','LWGEOM_addBBOX'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION dropBBOX(geometry)
RETURNS geometry
AS '@MODULE_FILENAME@','LWGEOM_dropBBOX'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION getSRID(geometry)
RETURNS int4
AS '@MODULE_FILENAME@','LWGEOM_getSRID'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION getBBOX(geometry)
RETURNS box2d
AS '@MODULE_FILENAME@','LWGEOM_to_BOX2DFLOAT4'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION translate(geometry,float8,float8,float8)
RETURNS geometry
AS '@MODULE_FILENAME@', 'LWGEOM_translate'
- LANGUAGE 'C' WITH (isstrict) ;
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict) ;
CREATEFUNCTION translate(geometry,float8,float8)
-RETURNS geometry
-AS '
- SELECT translate($1, $2, $3, 0)
-' LANGUAGE 'SQL' WITH (isstrict);
+ RETURNS geometry
+ AS ' SELECT translate($1, $2, $3, 0) '
+ LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict);
--- CHIP functions
CREATEFUNCTION srid(chip)
RETURNS int4
AS '@MODULE_FILENAME@','CHIP_getSRID'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION height(chip)
RETURNS int4
AS '@MODULE_FILENAME@','CHIP_getHeight'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION factor(chip)
RETURNS FLOAT4
AS '@MODULE_FILENAME@','CHIP_getFactor'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION width(chip)
RETURNS int4
AS '@MODULE_FILENAME@','CHIP_getWidth'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION datatype(chip)
RETURNS int4
AS '@MODULE_FILENAME@','CHIP_getDatatype'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION compression(chip)
RETURNS int4
AS '@MODULE_FILENAME@','CHIP_getCompression'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION setSRID(chip,int4)
RETURNS chip
AS '@MODULE_FILENAME@','CHIP_setSRID'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION setFactor(chip,float4)
RETURNS chip
AS '@MODULE_FILENAME@','CHIP_setFactor'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
------------------------------------------------------------------------
-- DEBUG
CREATEFUNCTION mem_size(geometry)
RETURNS int4
AS '@MODULE_FILENAME@', 'LWGEOM_mem_size'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION summary(geometry)
RETURNS text
AS '@MODULE_FILENAME@', 'LWGEOM_summary'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION npoints(geometry)
RETURNS int4
AS '@MODULE_FILENAME@', 'LWGEOM_npoints'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION nrings(geometry)
RETURNS int4
AS '@MODULE_FILENAME@', 'LWGEOM_nrings'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
------------------------------------------------------------------------
-- OGC defined
CREATEFUNCTION NumPoints(geometry)
RETURNS int4
AS '@MODULE_FILENAME@', 'LWGEOM_numpoints_linestring'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION NumGeometries(geometry)
RETURNS int4
AS '@MODULE_FILENAME@', 'LWGEOM_numgeometries_collection'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION GeometryN(geometry,integer)
RETURNS geometry
AS '@MODULE_FILENAME@', 'LWGEOM_geometryn_collection'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION Dimension(geometry)
RETURNS int4
AS '@MODULE_FILENAME@', 'LWGEOM_dimension'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION ExterioRring(geometry)
RETURNS geometry
AS '@MODULE_FILENAME@','LWGEOM_exteriorring_polygon'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION NumInteriorRings(geometry)
RETURNS integer
AS '@MODULE_FILENAME@','LWGEOM_numinteriorrings_polygon'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION InteriorRingN(geometry,integer)
RETURNS geometry
AS '@MODULE_FILENAME@','LWGEOM_interiorringn_polygon'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION GeometryType(geometry)
RETURNS text
AS '@MODULE_FILENAME@', 'LWGEOM_getTYPE'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION PointN(geometry,integer)
RETURNS geometry
AS '@MODULE_FILENAME@','LWGEOM_pointn_linestring'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION X(geometry)
RETURNS float8
AS '@MODULE_FILENAME@','LWGEOM_x_point'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION Y(geometry)
RETURNS float8
AS '@MODULE_FILENAME@','LWGEOM_y_point'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION Z(geometry)
RETURNS float8
AS '@MODULE_FILENAME@','LWGEOM_z_point'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION StartPoint(geometry)
RETURNS geometry
AS '@MODULE_FILENAME@', 'LWGEOM_startpoint_linestring'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION EndPoint(geometry)
RETURNS geometry
AS '@MODULE_FILENAME@', 'LWGEOM_endpoint_linestring'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION IsClosed(geometry)
RETURNS boolean
AS '@MODULE_FILENAME@', 'LWGEOM_isclosed_linestring'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION IsEmpty(geometry)
RETURNS boolean
AS '@MODULE_FILENAME@', 'LWGEOM_isempty'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION SRID(geometry)
RETURNS int4
AS '@MODULE_FILENAME@','LWGEOM_getSRID'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION SetSRID(geometry,int4)
RETURNS geometry
AS '@MODULE_FILENAME@','LWGEOM_setSRID'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION AsBinary(geometry)
RETURNS bytea
AS '@MODULE_FILENAME@','LWGEOM_asBinary'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION AsBinary(geometry,text)
RETURNS bytea
AS '@MODULE_FILENAME@','LWGEOM_asBinary'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION AsText(geometry)
RETURNS TEXT
AS '@MODULE_FILENAME@','LWGEOM_asText'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION GeometryFromText(geometry)
RETURNS geometry
AS '@MODULE_FILENAME@','LWGEOM_from_text'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION GeometryFromText(geometry, int4)
RETURNS geometry
AS '@MODULE_FILENAME@','LWGEOM_from_text'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION GeomFromText(geometry)
-RETURNS geometry AS '
-SELECT geometryfromtext($1)
-' LANGUAGE 'SQL' WITH (isstrict,iscachable);
+ RETURNS geometry AS 'SELECT geometryfromtext($1)'
+ LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION GeomFromText(geometry, int4)
-RETURNS geometry AS '
-SELECT geometryfromtext($1, $2)
-' LANGUAGE 'SQL' WITH (isstrict,iscachable);
+ RETURNS geometry AS 'SELECT geometryfromtext($1, $2)'
+ LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION PointFromText(geometry)
-RETURNS geometry
-AS ' SELECT CASE WHEN geometrytype($1) = ''POINT'' THEN $1
+ RETURNS geometry
+ AS '
+SELECT CASE WHEN geometrytype($1) = ''POINT'' THEN $1
ELSE NULL END
-' LANGUAGE 'SQL' WITH (isstrict,iscachable);
+'
+ LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION PointFromText(geometry, int4)
RETURNS geometry
AS ' SELECT CASE WHEN geometrytype($1) = ''POINT'' THEN setSRID($1,$2)
ELSE NULL END
-' LANGUAGE 'SQL' WITH (isstrict,iscachable);
+'
+ LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION LineFromText(geometry)
RETURNS geometry
AS ' SELECT CASE WHEN geometrytype($1) = ''LINESTRING'' THEN $1
ELSE NULL END
-' LANGUAGE 'SQL' WITH (isstrict,iscachable);
+'
+ LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION LineFromText(geometry, int4)
RETURNS geometry
AS ' SELECT CASE WHEN geometrytype($1) = ''LINESTRING'' THEN setSRID($1,$2)
ELSE NULL END
-' LANGUAGE 'SQL' WITH (isstrict,iscachable);
+'
+ LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION LineStringFromText(geometry)
RETURNS geometry
AS 'SELECT LineFromText($1)'
-LANGUAGE 'SQL' WITH (isstrict,iscachable);
+LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION LineStringFromText(geometry, int4)
RETURNS geometry
AS 'SELECT LineFromText($1, $2)'
-LANGUAGE 'SQL' WITH (isstrict,iscachable);
+LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION PolyFromText(geometry)
RETURNS geometry
AS ' SELECT CASE WHEN geometrytype($1) = ''POLYGON'' THEN $1
ELSE NULL END
-' LANGUAGE 'SQL' WITH (isstrict,iscachable);
+'
+ LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION PolyFromText(geometry, int4)
RETURNS geometry
AS ' SELECT CASE WHEN geometrytype($1) = ''POLYGON'' THEN setSRID($1,$2)
ELSE NULL END
-' LANGUAGE 'SQL' WITH (isstrict,iscachable);
+'
+ LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION PolygonFromText(geometry, int4)
RETURNS geometry
AS 'SELECT PolyFromText($1, $2)'
-LANGUAGE 'SQL' WITH (isstrict,iscachable);
+LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION PolygonFromText(geometry)
RETURNS geometry
AS 'SELECT PolyFromText($1)'
-LANGUAGE 'SQL' WITH (isstrict,iscachable);
+LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION MLineFromText(geometry, int4)
RETURNS geometry
AS 'SELECT CASE WHEN geometrytype($1) = ''MULTILINESTRING'' THEN setSRID($1,$2)
ELSE NULL END
-' LANGUAGE 'SQL' WITH (isstrict,iscachable);
+'
+ LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION MLineFromText(geometry)
RETURNS geometry
AS 'SELECT CASE WHEN geometrytype($1) = ''MULTILINESTRING'' THEN $1
ELSE NULL END
-' LANGUAGE 'SQL' WITH (isstrict,iscachable);
+'
+ LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION MultiLineStringFromText(geometry)
RETURNS geometry
AS 'SELECT MLineFromText($1)'
-LANGUAGE 'SQL' WITH (isstrict,iscachable);
+LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION MultiLineStringFromText(geometry, int4)
RETURNS geometry
AS 'SELECT MLineFromText($1, $2)'
-LANGUAGE 'SQL' WITH (isstrict,iscachable);
+LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION MPointFromText(geometry, int4)
RETURNS geometry
AS 'SELECT CASE WHEN geometrytype($1) = ''MULTIPOINT'' THEN setSRID($1,$2)
ELSE NULL END
-' LANGUAGE 'SQL' WITH (isstrict,iscachable);
+'
+ LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION MPointFromText(geometry)
RETURNS geometry
AS 'SELECT CASE WHEN geometrytype($1) = ''MULTIPOINT'' THEN $1
ELSE NULL END
-' LANGUAGE 'SQL' WITH (isstrict,iscachable);
+'
+ LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION MultiPointFromText(geometry, int4)
RETURNS geometry
AS 'SELECT MPointFromText($1, $2)'
-LANGUAGE 'SQL' WITH (isstrict,iscachable);
+LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION MultiPointFromText(geometry)
RETURNS geometry
AS 'SELECT MPointFromText($1)'
-LANGUAGE 'SQL' WITH (isstrict,iscachable);
+LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION MPolyFromText(geometry, int4)
RETURNS geometry
AS 'SELECT CASE WHEN geometrytype($1) = ''MULTIPOLYGON'' THEN setSRID($1,$2)
ELSE NULL END
-' LANGUAGE 'SQL' WITH (isstrict,iscachable);
+'
+LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION MPolyFromText(geometry)
RETURNS geometry
AS 'SELECT CASE WHEN geometrytype($1) = ''MULTIPOLYGON'' THEN $1
ELSE NULL END
-' LANGUAGE 'SQL' WITH (isstrict,iscachable);
+'
+LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION MultiPolygonFromText(geometry, int4)
RETURNS geometry
AS 'SELECT MPolyFromText($1, $2)'
-LANGUAGE 'SQL' WITH (isstrict,iscachable);
+LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION MultiPolygonFromText(geometry)
RETURNS geometry
AS 'SELECT MPolyFromText($1)'
-LANGUAGE 'SQL' WITH (isstrict,iscachable);
+LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION GeomCollFromText(geometry, int4)
RETURNS geometry
AS 'SELECT CASE WHEN geometrytype($1) = ''GEOMETRYCOLLECTION'' THEN
setSRID($1,$2)
ELSE NULL END
-' LANGUAGE 'SQL' WITH (isstrict,iscachable);
+'
+LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION GeomCollFromText(geometry)
RETURNS geometry
AS 'SELECT CASE WHEN geometrytype($1) = ''GEOMETRYCOLLECTION'' THEN $1
ELSE NULL END
-' LANGUAGE 'SQL' WITH (isstrict,iscachable);
+'
+LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION GeomFromWKB(bytea)
RETURNS geometry
AS '@MODULE_FILENAME@','LWGEOM_from_WKB'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION GeomFromWKB(bytea, int)
RETURNS geometry
AS 'SELECT setSRID(GeomFromWKB($1), $2)'
- LANGUAGE 'SQL' WITH (isstrict,iscachable);
+ LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION PointFromWKB(geometry, int)
RETURNS geometry
SELECT CASE WHEN geometrytype($1) = ''POINT'' THEN setSRID($1, $2)
ELSE NULL END
'
- LANGUAGE 'SQL' WITH (isstrict,iscachable);
+ LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION PointFromWKB(geometry)
RETURNS geometry
SELECT CASE WHEN geometrytype($1) = ''POINT'' THEN $1
ELSE NULL END
'
- LANGUAGE 'SQL' WITH (isstrict,iscachable);
+ LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION LineFromWKB(geometry, int)
RETURNS geometry
SELECT CASE WHEN geometrytype($1) = ''LINESTRING'' THEN setSRID($1, $2)
ELSE NULL END
'
- LANGUAGE 'SQL' WITH (isstrict,iscachable);
+ LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION LineFromWKB(geometry)
RETURNS geometry
SELECT CASE WHEN geometrytype($1) = ''LINESTRING'' THEN $1
ELSE NULL END
'
- LANGUAGE 'SQL' WITH (isstrict,iscachable);
+ LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION LinestringFromWKB(geometry, int)
RETURNS geometry
SELECT CASE WHEN geometrytype($1) = ''LINESTRING'' THEN setSRID($1, $2)
ELSE NULL END
'
- LANGUAGE 'SQL' WITH (isstrict,iscachable);
+ LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION LinestringFromWKB(geometry)
RETURNS geometry
SELECT CASE WHEN geometrytype($1) = ''LINESTRING'' THEN $1
ELSE NULL END
'
- LANGUAGE 'SQL' WITH (isstrict,iscachable);
+ LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION PolyFromWKB(geometry, int)
RETURNS geometry
SELECT CASE WHEN geometrytype($1) = ''POLYGON'' THEN setSRID($1, $2)
ELSE NULL END
'
- LANGUAGE 'SQL' WITH (isstrict,iscachable);
+ LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION PolyFromWKB(geometry)
RETURNS geometry
SELECT CASE WHEN geometrytype($1) = ''POLYGON'' THEN $1
ELSE NULL END
'
- LANGUAGE 'SQL' WITH (isstrict,iscachable);
+ LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION PolygonFromWKB(geometry, int)
RETURNS geometry
SELECT CASE WHEN geometrytype($1) = ''POLYGON'' THEN setSRID($1, $2)
ELSE NULL END
'
- LANGUAGE 'SQL' WITH (isstrict,iscachable);
+ LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION PolygonFromWKB(geometry)
RETURNS geometry
SELECT CASE WHEN geometrytype($1) = ''POLYGON'' THEN $1
ELSE NULL END
'
- LANGUAGE 'SQL' WITH (isstrict,iscachable);
+ LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION MPointFromWKB(geometry, int)
RETURNS geometry
SELECT CASE WHEN geometrytype($1) = ''MULTIPOINT'' THEN setSRID($1, $2)
ELSE NULL END
'
- LANGUAGE 'SQL' WITH (isstrict,iscachable);
+ LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION MPointFromWKB(geometry)
RETURNS geometry
SELECT CASE WHEN geometrytype($1) = ''MULTIPOINT'' THEN $1
ELSE NULL END
'
- LANGUAGE 'SQL' WITH (isstrict,iscachable);
+ LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION MultiPointFromWKB(geometry, int)
RETURNS geometry
SELECT CASE WHEN geometrytype($1) = ''MULTIPOINT'' THEN setSRID($1, $2)
ELSE NULL END
'
- LANGUAGE 'SQL' WITH (isstrict,iscachable);
+ LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION MultiPointFromWKB(geometry)
RETURNS geometry
SELECT CASE WHEN geometrytype($1) = ''MULTIPOINT'' THEN $1
ELSE NULL END
'
- LANGUAGE 'SQL' WITH (isstrict,iscachable);
+ LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION MultiLineFromWKB(geometry, int)
RETURNS geometry
THEN setSRID($1, $2)
ELSE NULL END
'
- LANGUAGE 'SQL' WITH (isstrict,iscachable);
+ LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION MultiLineFromWKB(geometry)
RETURNS geometry
SELECT CASE WHEN geometrytype($1) = ''MULTILINESTRING'' THEN $1
ELSE NULL END
'
- LANGUAGE 'SQL' WITH (isstrict,iscachable);
+ LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION MLineFromWKB(geometry, int)
RETURNS geometry
THEN setSRID($1, $2)
ELSE NULL END
'
- LANGUAGE 'SQL' WITH (isstrict,iscachable);
+ LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION MLineFromWKB(geometry)
RETURNS geometry
SELECT CASE WHEN geometrytype($1) = ''MULTILINESTRING'' THEN $1
ELSE NULL END
'
- LANGUAGE 'SQL' WITH (isstrict,iscachable);
+ LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION MPolyFromWKB(geometry, int)
RETURNS geometry
setSRID($1, $2)
ELSE NULL END
'
- LANGUAGE 'SQL' WITH (isstrict,iscachable);
+ LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION MPolyFromWKB(geometry)
RETURNS geometry
SELECT CASE WHEN geometrytype($1) = ''MULTIPOLYGON'' THEN $1
ELSE NULL END
'
- LANGUAGE 'SQL' WITH (isstrict,iscachable);
+ LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION MultiPolyFromWKB(geometry, int)
RETURNS geometry
setSRID($1, $2)
ELSE NULL END
'
- LANGUAGE 'SQL' WITH (isstrict,iscachable);
+ LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION MultiPolyFromWKB(geometry)
RETURNS geometry
SELECT CASE WHEN geometrytype($1) = ''MULTIPOLYGON'' THEN $1
ELSE NULL END
'
- LANGUAGE 'SQL' WITH (isstrict,iscachable);
+ LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION GeomCollFromWKB(geometry, int)
RETURNS geometry
setSRID($1, $2)
ELSE NULL END
'
- LANGUAGE 'SQL' WITH (isstrict,iscachable);
+ LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION GeomCollFromWKB(geometry)
RETURNS geometry
$1
ELSE NULL END
'
- LANGUAGE 'SQL' WITH (isstrict,iscachable);
+ LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
------------------------------------------------------------------------
-- Misures
CREATEFUNCTION length3d(geometry)
RETURNS FLOAT8
AS '@MODULE_FILENAME@', 'LWGEOM_length_linestring'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION length2d(geometry)
RETURNS FLOAT8
AS '@MODULE_FILENAME@', 'LWGEOM_length2d_linestring'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION length(geometry)
RETURNS FLOAT8
AS '@MODULE_FILENAME@', 'LWGEOM_length_linestring'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
-- this is a fake (for back-compatibility)
-- uses 3d if 3d is available, 2d otherwise
CREATEFUNCTION length3d_spheroid(geometry, spheroid)
RETURNS FLOAT8
AS '@MODULE_FILENAME@','LWGEOM_length_ellipsoid_linestring'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION length_spheroid(geometry, spheroid)
RETURNS FLOAT8
AS '@MODULE_FILENAME@','LWGEOM_length_ellipsoid_linestring'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION length2d_spheroid(geometry, spheroid)
RETURNS FLOAT8
AS '@MODULE_FILENAME@','LWGEOM_length2d_ellipsoid_linestring'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
-- this is a fake (for back-compatibility)
-- uses 3d if 3d is available, 2d otherwise
CREATEFUNCTION perimeter3d(geometry)
RETURNS FLOAT8
AS '@MODULE_FILENAME@', 'LWGEOM_perimeter_poly'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION perimeter2d(geometry)
RETURNS FLOAT8
AS '@MODULE_FILENAME@', 'LWGEOM_perimeter2d_poly'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION perimeter(geometry)
RETURNS FLOAT8
AS '@MODULE_FILENAME@', 'LWGEOM_perimeter_poly'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
-- this is an alias for 'area(geometry)'
-- there is nothing such an 'area3d'...
CREATEFUNCTION area2d(geometry)
RETURNS FLOAT8
AS '@MODULE_FILENAME@', 'LWGEOM_area_polygon'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION area(geometry)
RETURNS FLOAT8
AS '@MODULE_FILENAME@','LWGEOM_area_polygon'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION distance_spheroid(geometry,geometry,spheroid)
RETURNS FLOAT8
AS '@MODULE_FILENAME@','LWGEOM_distance_ellipsoid_point'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
-- Minimum distance. 2d only.
CREATEFUNCTION distance(geometry,geometry)
RETURNS float8
AS '@MODULE_FILENAME@', 'LWGEOM_mindistance2d'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
-- Maximum distance between linestrings. 2d only. Very bogus.
CREATEFUNCTION max_distance(geometry,geometry)
RETURNS float8
AS '@MODULE_FILENAME@', 'LWGEOM_maxdistance2d_linestring'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION point_inside_circle(geometry,float8,float8,float8)
RETURNS bool
AS '@MODULE_FILENAME@', 'LWGEOM_inside_circle_point'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
------------------------------------------------------------------------
CREATEFUNCTION force_2d(geometry)
RETURNS geometry
AS '@MODULE_FILENAME@', 'LWGEOM_force_2d'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION force_3dz(geometry)
RETURNS geometry
AS '@MODULE_FILENAME@', 'LWGEOM_force_3dz'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
-- an alias for force_3dz
CREATEFUNCTION force_3d(geometry)
RETURNS geometry
AS '@MODULE_FILENAME@', 'LWGEOM_force_3dz'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION force_3dm(geometry)
RETURNS geometry
AS '@MODULE_FILENAME@', 'LWGEOM_force_3dm'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION force_4d(geometry)
RETURNS geometry
AS '@MODULE_FILENAME@', 'LWGEOM_force_4d'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION force_collection(geometry)
RETURNS geometry
AS '@MODULE_FILENAME@', 'LWGEOM_force_collection'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION multi(geometry)
RETURNS geometry
AS '@MODULE_FILENAME@', 'LWGEOM_force_multi'
- LANGUAGE 'C' WITH (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
CREATEFUNCTION collector(geometry, geometry)
RETURNS geometry
AS '@MODULE_FILENAME@', 'LWGEOM_collect'
- LANGUAGE 'C';
+ LANGUAGE 'C' _IMMUTABLE;
CREATEFUNCTION collect(geometry, geometry)
RETURNS geometry
AS '@MODULE_FILENAME@', 'LWGEOM_collect'
- LANGUAGE 'C';
+ LANGUAGE 'C' _IMMUTABLE;
CREATE AGGREGATE memcollect(
sfunc = collect,
CREATEFUNCTION geom_accum (geometry[],geometry)
RETURNS geometry[]
AS '@MODULE_FILENAME@', 'LWGEOM_accum'
- LANGUAGE 'C';
+ LANGUAGE 'C' _IMMUTABLE;
CREATE AGGREGATE accum (
sfunc = geom_accum,
CREATEFUNCTION collect_garray (geometry[])
RETURNS geometry
AS '@MODULE_FILENAME@', 'LWGEOM_collect_garray'
- LANGUAGE 'C';
+ LANGUAGE 'C' _IMMUTABLE_STRICT;
CREATE AGGREGATE collect (
sfunc = geom_accum,
CREATEFUNCTION expand(box3d,float8)
RETURNS box3d
AS '@MODULE_FILENAME@', 'BOX3D_expand'
- LANGUAGE 'C' WITH (iscachable,isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (iscachable,isstrict);
CREATEFUNCTION expand(box2d,float8)
RETURNS box2d
AS '@MODULE_FILENAME@', 'BOX2DFLOAT4_expand'
- LANGUAGE 'C' WITH (iscachable,isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (iscachable,isstrict);
CREATEFUNCTION expand(geometry,float8)
RETURNS geometry
AS '@MODULE_FILENAME@', 'LWGEOM_expand'
- LANGUAGE 'C' WITH (iscachable,isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (iscachable,isstrict);
CREATEFUNCTION envelope(geometry)
RETURNS geometry
AS '@MODULE_FILENAME@', 'LWGEOM_envelope'
- LANGUAGE 'C' WITH (iscachable,isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (iscachable,isstrict);
CREATEFUNCTION reverse(geometry)
RETURNS geometry
AS '@MODULE_FILENAME@', 'LWGEOM_reverse'
- LANGUAGE 'C' WITH (iscachable,isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (iscachable,isstrict);
CREATEFUNCTION ForceRHR(geometry)
RETURNS geometry
AS '@MODULE_FILENAME@', 'LWGEOM_forceRHR_poly'
- LANGUAGE 'C' WITH (iscachable,isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (iscachable,isstrict);
CREATEFUNCTION noop(geometry)
RETURNS geometry
AS '@MODULE_FILENAME@', 'LWGEOM_noop'
- LANGUAGE 'C' WITH (iscachable,isstrict);
+ LANGUAGE 'C' _VOLATILE_STRICT; -- WITH (iscachable,isstrict);
CREATEFUNCTION zmflag(geometry)
RETURNS smallint
AS '@MODULE_FILENAME@', 'LWGEOM_zmflag'
- LANGUAGE 'C' WITH (iscachable,isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (iscachable,isstrict);
CREATEFUNCTION hasBBOX(geometry)
RETURNS bool
AS '@MODULE_FILENAME@', 'LWGEOM_hasBBOX'
- LANGUAGE 'C' WITH (iscachable,isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (iscachable,isstrict);
CREATEFUNCTION ndims(geometry)
RETURNS smallint
AS '@MODULE_FILENAME@', 'LWGEOM_ndims'
- LANGUAGE 'C' WITH (iscachable,isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (iscachable,isstrict);
CREATEFUNCTION AsEWKT(geometry)
RETURNS TEXT
AS '@MODULE_FILENAME@','LWGEOM_asEWKT'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION AsEWKB(geometry)
RETURNS BYTEA
AS '@MODULE_FILENAME@','WKBFromLWGEOM'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION AsEWKB(geometry,text)
RETURNS bytea
AS '@MODULE_FILENAME@','WKBFromLWGEOM'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION GeomFromEWKB(bytea)
RETURNS geometry
AS '@MODULE_FILENAME@','LWGEOMFromWKB'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION GeomFromEWKT(text)
RETURNS geometry
AS '@MODULE_FILENAME@','parse_WKT_lwgeom'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION cache_bbox()
RETURNS trigger
CREATEFUNCTION makePoint(float8, float8)
RETURNS geometry
AS '@MODULE_FILENAME@', 'LWGEOM_makepoint'
- LANGUAGE 'C' WITH (iscachable,isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (iscachable,isstrict);
CREATEFUNCTION makePoint(float8, float8, float8)
RETURNS geometry
AS '@MODULE_FILENAME@', 'LWGEOM_makepoint'
- LANGUAGE 'C' WITH (iscachable,isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (iscachable,isstrict);
CREATEFUNCTION makePoint(float8, float8, float8, float8)
RETURNS geometry
AS '@MODULE_FILENAME@', 'LWGEOM_makepoint'
- LANGUAGE 'C' WITH (iscachable,isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (iscachable,isstrict);
CREATEFUNCTION makePointM(float8, float8, float8)
RETURNS geometry
AS '@MODULE_FILENAME@', 'LWGEOM_makepoint3dm'
- LANGUAGE 'C' WITH (iscachable,isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (iscachable,isstrict);
CREATEFUNCTION makeBox2d(geometry, geometry)
RETURNS box2d
AS '@MODULE_FILENAME@', 'BOX2DFLOAT4_construct'
- LANGUAGE 'C' WITH (iscachable,isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (iscachable,isstrict);
CREATEFUNCTION makeBox3d(geometry, geometry)
RETURNS box3d
AS '@MODULE_FILENAME@', 'BOX3D_construct'
- LANGUAGE 'C' WITH (iscachable,isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (iscachable,isstrict);
CREATEFUNCTION makeline_garray (geometry[])
RETURNS geometry
AS '@MODULE_FILENAME@', 'LWGEOM_makeline_garray'
- LANGUAGE 'C';
+ LANGUAGE 'C' _IMMUTABLE_STRICT;
CREATEFUNCTION LineFromMultiPoint(geometry)
RETURNS geometry
AS '@MODULE_FILENAME@', 'LWGEOM_line_from_mpoint'
- LANGUAGE 'C' WITH (iscachable,isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (iscachable,isstrict);
CREATEFUNCTION MakeLine(geometry, geometry)
RETURNS geometry
AS '@MODULE_FILENAME@', 'LWGEOM_makeline'
- LANGUAGE 'C' WITH (iscachable,isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (iscachable,isstrict);
CREATEFUNCTION AddPoint(geometry, geometry)
RETURNS geometry
AS '@MODULE_FILENAME@', 'LWGEOM_addpoint'
- LANGUAGE 'C' WITH (iscachable,isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (iscachable,isstrict);
CREATEFUNCTION AddPoint(geometry, geometry, integer)
RETURNS geometry
AS '@MODULE_FILENAME@', 'LWGEOM_addpoint'
- LANGUAGE 'C' WITH (iscachable,isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (iscachable,isstrict);
CREATE AGGREGATE makeline (
sfunc = geom_accum,
CREATEFUNCTION MakePolygon(geometry, geometry[])
RETURNS geometry
AS '@MODULE_FILENAME@', 'LWGEOM_makepoly'
- LANGUAGE 'C' WITH (iscachable,isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (iscachable,isstrict);
CREATEFUNCTION MakePolygon(geometry)
RETURNS geometry
AS '@MODULE_FILENAME@', 'LWGEOM_makepoly'
- LANGUAGE 'C' WITH (iscachable,isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (iscachable,isstrict);
CREATEFUNCTION polygonize_garray (geometry[])
RETURNS geometry
AS '@MODULE_FILENAME@', 'GEOS_polygonize_garray'
- LANGUAGE 'C';
+ LANGUAGE 'C' _IMMUTABLE_STRICT;
CREATE AGGREGATE polygonize (
sfunc = geom_accum,
CREATEFUNCTION dump(geometry)
RETURNS SETOF geometry_dump
AS '@MODULE_FILENAME@', 'LWGEOM_dump'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
#endif // USE_VERSION > 72
CREATEFUNCTION combine_bbox(box2d,geometry)
RETURNS box2d
AS '@MODULE_FILENAME@', 'BOX2DFLOAT4_combine'
- LANGUAGE 'C';
+ LANGUAGE 'C' _IMMUTABLE;
CREATE AGGREGATE extent(
sfunc = combine_bbox,
CREATEFUNCTION combine_bbox(box3d,geometry)
RETURNS box3d
AS '@MODULE_FILENAME@', 'BOX3D_combine'
- LANGUAGE 'C';
+ LANGUAGE 'C' _IMMUTABLE;
CREATE AGGREGATE extent3d(
sfunc = combine_bbox,
CREATEFUNCTION create_histogram2d(box2d,int)
RETURNS histogram2d
AS '@MODULE_FILENAME@','create_lwhistogram2d'
- LANGUAGE 'C' with (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
-----------------------------------------------------------------------
-- BUILD_HISTOGRAM2D( <histogram2d>, <tablename>, <columnname> )
CREATEFUNCTION build_histogram2d (histogram2d,text,text)
RETURNS histogram2d
AS '@MODULE_FILENAME@','build_lwhistogram2d'
- LANGUAGE 'C' with (isstrict);
+ LANGUAGE 'C' _STABLE_STRICT; -- WITH (isstrict);
#if USE_VERSION >= 73
-----------------------------------------------------------------------
EXECUTE ''SET local search_path = ''||$2||'',public'';
RETURN public.build_histogram2d($1,$3,$4);
END
-' LANGUAGE 'plpgsql' with (isstrict);
+'
+LANGUAGE 'plpgsql' _STABLE_STRICT; -- WITH (isstrict);
#endif // USE_VERSION >= 73
-----------------------------------------------------------------------
CREATEFUNCTION explode_histogram2d (histogram2d,text)
RETURNS histogram2d
AS '@MODULE_FILENAME@','explode_lwhistogram2d'
- LANGUAGE 'C' with (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
-----------------------------------------------------------------------
-- ESTIMATE_HISTOGRAM2D( <histogram2d>, <box> )
CREATEFUNCTION estimate_histogram2d(histogram2d,box2d)
RETURNS float8
AS '@MODULE_FILENAME@','estimate_lwhistogram2d'
- LANGUAGE 'C' with (isstrict);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
-----------------------------------------------------------------------
-- ESTIMATED_EXTENT( <schema name>, <table name>, <column name> )
-----------------------------------------------------------------------
CREATEFUNCTION estimated_extent(text,text,text) RETURNS box2d AS
'@MODULE_FILENAME@', 'LWGEOM_estimated_extent'
- LANGUAGE 'C' with (isstrict);
+ LANGUAGE 'C' _STABLE_STRICT; -- WITH (isstrict);
-----------------------------------------------------------------------
-- ESTIMATED_EXTENT( <table name>, <column name> )
-----------------------------------------------------------------------
CREATEFUNCTION estimated_extent(text,text) RETURNS box2d AS
'@MODULE_FILENAME@', 'LWGEOM_estimated_extent'
- LANGUAGE 'C' with (isstrict);
+ LANGUAGE 'C' _STABLE_STRICT; -- WITH (isstrict);
-----------------------------------------------------------------------
-- FIND_EXTENT( <schema name>, <table name>, <column name> )
END LOOP;
END;
'
-LANGUAGE 'plpgsql' WITH (isstrict);
+LANGUAGE 'plpgsql' _STABLE_STRICT; -- WITH (isstrict);
-----------------------------------------------------------------------
-- FIND_EXTENT( <table name>, <column name> )
END LOOP;
END;
'
-LANGUAGE 'plpgsql' WITH (isstrict);
+LANGUAGE 'plpgsql' _STABLE_STRICT; -- WITH (isstrict);
-------------------------------------------------------------------
-- SPATIAL_REF_SYS
AS
'
SELECT ''rename_geometry_table_constraint() is obsoleted''::text
-' LANGUAGE 'SQL';
+'
+LANGUAGE 'SQL' _IMMUTABLE;
-----------------------------------------------------------------------
-- FIX_GEOMETRY_COLUMNS()
END;
'
-LANGUAGE 'plpgsql' ;
+LANGUAGE 'plpgsql' _VOLATILE;
-----------------------------------------------------------------------
-- PROBE_GEOMETRY_COLUMNS()
'' stale:''||stale;
END
-' LANGUAGE 'plpgsql';
+'
+LANGUAGE 'plpgsql' _VOLATILE;
-----------------------------------------------------------------------
-- ADDGEOMETRYCOLUMN
'' DIMS:'' || new_dim || ''\n '' ||
''geometry_column '' || fixgeomres;
END;
-' LANGUAGE 'plpgsql' WITH (isstrict);
+'
+LANGUAGE 'plpgsql' _VOLATILE_STRICT; -- WITH (isstrict);
----------------------------------------------------------------------------
-- ADDGEOMETRYCOLUMN ( <schema>, <table>, <column>, <srid>, <type>, <dim> )
SELECT AddGeometryColumn('''',$1,$2,$3,$4,$5,$6) into ret;
RETURN ret;
END;
-' LANGUAGE 'plpgsql' WITH (isstrict);
+'
+LANGUAGE 'plpgsql' _STABLE_STRICT; -- WITH (isstrict);
----------------------------------------------------------------------------
-- ADDGEOMETRYCOLUMN ( <table>, <column>, <srid>, <type>, <dim> )
SELECT AddGeometryColumn('''','''',$1,$2,$3,$4,$5) into ret;
RETURN ret;
END;
-' LANGUAGE 'plpgsql' WITH (isstrict);
+'
+LANGUAGE 'plpgsql' _VOLATILE_STRICT; -- WITH (isstrict);
-----------------------------------------------------------------------
-- DROPGEOMETRYCOLUMN
END;
'
-LANGUAGE 'plpgsql' WITH (isstrict);
+LANGUAGE 'plpgsql' _VOLATILE_STRICT; -- WITH (isstrict);
-----------------------------------------------------------------------
-- DROPGEOMETRYCOLUMN
SELECT DropGeometryColumn('''',$1,$2,$3) into ret;
RETURN ret;
END;
-' LANGUAGE 'plpgsql' WITH (isstrict);
+'
+LANGUAGE 'plpgsql' _VOLATILE_STRICT; -- WITH (isstrict);
-----------------------------------------------------------------------
-- DROPGEOMETRYCOLUMN
SELECT DropGeometryColumn('''','''',$1,$2) into ret;
RETURN ret;
END;
-' LANGUAGE 'plpgsql' WITH (isstrict);
+'
+LANGUAGE 'plpgsql' _VOLATILE_STRICT; -- WITH (isstrict);
-----------------------------------------------------------------------
-- DROPGEOMETRYTABLE
END;
'
-LANGUAGE 'plpgsql' WITH (isstrict);
+LANGUAGE 'plpgsql' _VOLATILE_STRICT; -- WITH (isstrict);
-----------------------------------------------------------------------
-- DROPGEOMETRYTABLE
-----------------------------------------------------------------------
CREATEFUNCTION DropGeometryTable(varchar) RETURNS text AS
'SELECT DropGeometryTable('''','''',$1)'
-LANGUAGE 'sql' WITH (isstrict);
+LANGUAGE 'sql' _VOLATILE_STRICT; -- WITH (isstrict);
-----------------------------------------------------------------------
-- UPDATEGEOMETRYSRID
END;
'
-LANGUAGE 'plpgsql' WITH (isstrict);
+LANGUAGE 'plpgsql' _VOLATILE_STRICT; -- WITH (isstrict);
-----------------------------------------------------------------------
-- UPDATEGEOMETRYSRID
SELECT UpdateGeometrySRID('''',$1,$2,$3,$4) into ret;
RETURN ret;
END;
-' LANGUAGE 'plpgsql' WITH (isstrict);
+'
+LANGUAGE 'plpgsql' _VOLATILE_STRICT; -- WITH (isstrict);
-----------------------------------------------------------------------
-- UPDATEGEOMETRYSRID
SELECT UpdateGeometrySRID('''','''',$1,$2,$3) into ret;
RETURN ret;
END;
-' LANGUAGE 'plpgsql' WITH (isstrict);
+'
+LANGUAGE 'plpgsql' _VOLATILE_STRICT; -- WITH (isstrict);
-----------------------------------------------------------------------
-- UPDATE_GEOMETRY_STATS()
return result;
END;
'
-LANGUAGE 'plpgsql' ;
+LANGUAGE 'plpgsql' _VOLATILE_STRICT;
#endif // USE_VERSION < 80
-----------------------------------------------------------------------
return result;
END;
'
-LANGUAGE 'plpgsql' ;
+LANGUAGE 'plpgsql' _VOLATILE_STRICT;
#endif // USE_VERSION < 80
return sr;
END;
'
-LANGUAGE 'plpgsql' WITH (iscachable);
+LANGUAGE 'plpgsql' _STABLE_STRICT; -- WITH (iscachable);
---------------------------------------------------------------
CREATEFUNCTION get_proj4_from_srid(integer) RETURNS text AS
'SELECT proj4text::text FROM spatial_ref_sys WHERE srid= $1'
-LANGUAGE 'sql' WITH (iscachable,isstrict);
+LANGUAGE 'sql' _STABLE_STRICT; -- WITH (iscachable,isstrict);
CREATEFUNCTION transform_geometry(geometry,text,text,int)
RETURNS geometry
AS '@MODULE_FILENAME@','transform_geom'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _STABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION transform(geometry,integer) RETURNS geometry AS
'BEGIN
RETURN transform_geometry( $1 , get_proj4_from_srid(SRID( $1 ) ), get_proj4_from_srid( $2 ), $2 );
END;'
-LANGUAGE 'plpgsql' WITH (iscachable,isstrict);
+LANGUAGE 'plpgsql' _STABLE_STRICT; -- WITH (iscachable,isstrict);
-----------------------------------------------------------------------
-- POSTGIS_VERSION()
CREATEFUNCTION postgis_version() RETURNS text
AS 'SELECT \'@POSTGIS_VERSION@\'::text AS version'
- LANGUAGE 'sql';
+ LANGUAGE 'sql' _IMMUTABLE;
CREATEFUNCTION postgis_proj_version() RETURNS text
AS '@MODULE_FILENAME@'
- LANGUAGE 'C';
+ LANGUAGE 'C' _STABLE;
CREATEFUNCTION postgis_scripts_installed() RETURNS text
AS 'SELECT \'@POSTGIS_SCRIPTS_VERSION@\'::text AS version'
- LANGUAGE 'sql';
+ LANGUAGE 'sql' _IMMUTABLE;
CREATEFUNCTION postgis_lib_version() RETURNS text
AS '@MODULE_FILENAME@'
- LANGUAGE 'C';
+ LANGUAGE 'C' _IMMUTABLE; -- a new lib will require a new session
CREATEFUNCTION postgis_scripts_released() RETURNS text
AS '@MODULE_FILENAME@'
- LANGUAGE 'C';
+ LANGUAGE 'C' _IMMUTABLE;
CREATEFUNCTION postgis_uses_stats() RETURNS bool
AS '@MODULE_FILENAME@'
- LANGUAGE 'C';
+ LANGUAGE 'C' _IMMUTABLE;
CREATEFUNCTION postgis_geos_version() RETURNS text
AS '@MODULE_FILENAME@'
- LANGUAGE 'C';
+ LANGUAGE 'C' _STABLE;
CREATEFUNCTION postgis_scripts_build_date() RETURNS text
AS 'SELECT \'@POSTGIS_BUILD_DATE@\'::text AS version'
- LANGUAGE 'sql';
+ LANGUAGE 'sql' _IMMUTABLE;
CREATEFUNCTION postgis_lib_build_date() RETURNS text
AS '@MODULE_FILENAME@'
- LANGUAGE 'C';
+ LANGUAGE 'C' _IMMUTABLE;
RETURN fullver;
END
-' LANGUAGE 'plpgsql';
+'
+LANGUAGE 'plpgsql' _STABLE;
---------------------------------------------------------------
-- CASTS
CREATEFUNCTION box2d(geometry)
RETURNS box2d
AS '@MODULE_FILENAME@','LWGEOM_to_BOX2DFLOAT4'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION box3d(geometry)
RETURNS box3d
AS '@MODULE_FILENAME@','LWGEOM_to_BOX3D'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION box(geometry)
RETURNS box
AS '@MODULE_FILENAME@','LWGEOM_to_BOX'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION box2d(box3d)
RETURNS box2d
AS '@MODULE_FILENAME@','BOX3D_to_BOX2DFLOAT4'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION box3d(box2d)
RETURNS box3d
AS '@MODULE_FILENAME@','BOX2DFLOAT4_to_BOX3D'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION box(box3d)
RETURNS box
AS '@MODULE_FILENAME@','BOX3D_to_BOX'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION text(geometry)
RETURNS text
AS '@MODULE_FILENAME@','LWGEOM_to_text'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
-- this is kept for backward-compatibility
CREATEFUNCTION box3dtobox(box3d)
RETURNS box
AS 'SELECT box($1)'
- LANGUAGE 'SQL' WITH (isstrict,iscachable);
+ LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION geometry(box2d)
RETURNS geometry
AS '@MODULE_FILENAME@','BOX2DFLOAT4_to_LWGEOM'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION geometry(box3d)
RETURNS geometry
AS '@MODULE_FILENAME@','BOX3D_to_LWGEOM'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION geometry(text)
RETURNS geometry
AS '@MODULE_FILENAME@','parse_WKT_lwgeom'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION geometry(chip)
RETURNS geometry
AS '@MODULE_FILENAME@','CHIP_to_LWGEOM'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION geometry(bytea)
RETURNS geometry
AS '@MODULE_FILENAME@','LWGEOM_from_bytea'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION bytea(geometry)
RETURNS bytea
AS '@MODULE_FILENAME@','LWGEOM_to_bytea'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
-- 7.3+ explicit casting definitions
#if USE_VERSION >= 73
CREATEFUNCTION simplify(geometry, float8)
RETURNS geometry
AS '@MODULE_FILENAME@', 'LWGEOM_simplify2d'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION SnapToGrid(geometry, float8, float8, float8, float8)
RETURNS geometry
AS '@MODULE_FILENAME@', 'LWGEOM_snaptogrid'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION SnapToGrid(geometry, float8, float8)
RETURNS geometry
AS 'SELECT SnapToGrid($1, 0, 0, $2, $3)'
- LANGUAGE 'SQL' WITH (isstrict,iscachable);
+ LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION SnapToGrid(geometry, float8)
RETURNS geometry
AS 'SELECT SnapToGrid($1, 0, 0, $2, $2)'
- LANGUAGE 'SQL' WITH (isstrict,iscachable);
+ LANGUAGE 'SQL' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION line_interpolate_point(geometry, float8)
RETURNS geometry
AS '@MODULE_FILENAME@', 'LWGEOM_line_interpolate_point'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION segmentize(geometry, float8)
RETURNS geometry
AS '@MODULE_FILENAME@', 'LWGEOM_segmentize2d'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
---------------------------------------------------------------
-- GEOS
CREATEFUNCTION intersection(geometry,geometry)
RETURNS geometry
AS '@MODULE_FILENAME@','intersection'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION buffer(geometry,float8)
RETURNS geometry
AS '@MODULE_FILENAME@','buffer'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION buffer(geometry,float8,integer)
RETURNS geometry
AS '@MODULE_FILENAME@','buffer'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION convexhull(geometry)
RETURNS geometry
AS '@MODULE_FILENAME@','convexhull'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION difference(geometry,geometry)
RETURNS geometry
AS '@MODULE_FILENAME@','difference'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION boundary(geometry)
RETURNS geometry
AS '@MODULE_FILENAME@','boundary'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION symdifference(geometry,geometry)
RETURNS geometry
AS '@MODULE_FILENAME@','symdifference'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION symmetricdifference(geometry,geometry)
RETURNS geometry
AS '@MODULE_FILENAME@','symdifference'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION GeomUnion(geometry,geometry)
RETURNS geometry
AS '@MODULE_FILENAME@','geomunion'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATE AGGREGATE MemGeomUnion (
basetype = geometry,
CREATEFUNCTION unite_garray (geometry[])
RETURNS geometry
AS '@MODULE_FILENAME@'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATE AGGREGATE GeomUnion (
sfunc = geom_accum,
CREATEFUNCTION relate(geometry,geometry)
RETURNS text
AS '@MODULE_FILENAME@','relate_full'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION relate(geometry,geometry,text)
RETURNS boolean
AS '@MODULE_FILENAME@','relate_pattern'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION disjoint(geometry,geometry)
RETURNS boolean
AS '@MODULE_FILENAME@'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION touches(geometry,geometry)
RETURNS boolean
AS '@MODULE_FILENAME@'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION intersects(geometry,geometry)
RETURNS boolean
AS '@MODULE_FILENAME@'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION crosses(geometry,geometry)
RETURNS boolean
AS '@MODULE_FILENAME@'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION within(geometry,geometry)
RETURNS boolean
AS '@MODULE_FILENAME@'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION contains(geometry,geometry)
RETURNS boolean
AS '@MODULE_FILENAME@'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION overlaps(geometry,geometry)
RETURNS boolean
AS '@MODULE_FILENAME@'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION IsValid(geometry)
RETURNS boolean
AS '@MODULE_FILENAME@', 'isvalid'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION GEOSnoop(geometry)
RETURNS geometry
AS '@MODULE_FILENAME@', 'GEOSnoop'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _VOLATILE_STRICT; -- WITH (isstrict,iscachable);
-- This is also available w/out GEOS
CREATEFUNCTION Centroid(geometry)
RETURNS geometry
AS '@MODULE_FILENAME@'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION IsRing(geometry)
RETURNS boolean
AS '@MODULE_FILENAME@'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION PointOnSurface(geometry)
RETURNS geometry
AS '@MODULE_FILENAME@'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION IsSimple(geometry)
RETURNS boolean
AS '@MODULE_FILENAME@', 'issimple'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION Equals(geometry,geometry)
RETURNS boolean
AS '@MODULE_FILENAME@','geomequals'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
-----------------------------------------------------------------------
-- SVG OUTPUT
CREATEFUNCTION AsSVG(geometry,int4,int4)
RETURNS TEXT
AS '@MODULE_FILENAME@','assvg_geometry'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION AsSVG(geometry,int4)
RETURNS TEXT
AS '@MODULE_FILENAME@','assvg_geometry'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
CREATEFUNCTION AsSVG(geometry)
RETURNS TEXT
AS '@MODULE_FILENAME@','assvg_geometry'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
-----------------------------------------------------------------------
-- GML OUTPUT
CREATEFUNCTION AsGML(geometry, int4, int4)
RETURNS TEXT
AS '@MODULE_FILENAME@','LWGEOM_asGML'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
-- AsGML(geom, precision) / version=2
CREATEFUNCTION AsGML(geometry, int4)
RETURNS TEXT
AS '@MODULE_FILENAME@','LWGEOM_asGML'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
-- AsGML(geom) / precision=15 version=2
CREATEFUNCTION AsGML(geometry)
RETURNS TEXT
AS '@MODULE_FILENAME@','LWGEOM_asGML'
- LANGUAGE 'C' WITH (isstrict,iscachable);
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable);
---------------------------------------------------------------
-- END