[postgis-tickets] [SCM] PostGIS branch stable-3.2 updated. 3.2.2-6-g80ff12916

git at osgeo.org git at osgeo.org
Tue Jul 26 07:47:15 PDT 2022


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.2 has been updated
       via  80ff12916c20ad5b59a7151f803a867c4f876395 (commit)
       via  37d8bb476129f3caf2410c8f033e09d3bbf13c9b (commit)
      from  0a426301696a64bd1db11e7f8c72814e807e16b1 (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 80ff12916c20ad5b59a7151f803a867c4f876395
Author: Regina Obe <lr at pcorp.us>
Date:   Tue Jul 26 10:27:03 2022 -0400

    Use read only SPI to maintain parallel safety
    for ST_AsGeoJSON and ST_AsGML
    References #5139 for PostGIS 3.2.3

diff --git a/NEWS b/NEWS
index db3f28b30..ae08dca82 100644
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,9 @@ Proj 6.1+, and PostgreSQL 14+.
 
 * Bug Fixes *
   - #5191, Use integer instead of int4 (Regina Obe)
+  - #5139, PostGIS causes to_jsonb to no longer be parallel safe,
+           ST_AsGeoJSON and ST_AsGML are also parallel unsafe
+           (Regina Obe, Paul Ramsey)
 
 
 PostGIS 3.2.2
diff --git a/libpgcommon/lwgeom_cache.c b/libpgcommon/lwgeom_cache.c
index f6934b387..7e013895d 100644
--- a/libpgcommon/lwgeom_cache.c
+++ b/libpgcommon/lwgeom_cache.c
@@ -297,7 +297,7 @@ getSRSbySRID(FunctionCallInfo fcinfo, int32_t srid, bool short_crs)
 			 postgis_spatial_ref_sys(),
 			 srid);
 
-	err = SPI_exec(query, 1);
+	err = SPI_execute(query, true, 1);
 	if (err < 0)
 	{
 		elog(NOTICE, "%s: error executing query %d", __func__, err);
diff --git a/regress/core/tickets.sql b/regress/core/tickets.sql
index e1ca854c3..404ecc208 100644
--- a/regress/core/tickets.sql
+++ b/regress/core/tickets.sql
@@ -1435,3 +1435,29 @@ SELECT
 
 -- https://trac.osgeo.org/postgis/ticket/5151
 SELECT '#5151', ST_SetPoint(ST_GeomFromText('LINESTRING EMPTY',4326), 1, ST_GeomFromText('POINT(40 50)',4326)) As result;
+
+-- https://trac.osgeo.org/postgis/ticket/5139
+SET client_min_messages TO ERROR;
+DROP TABLE IF EXISTS a;
+CREATE TABLE a AS
+SELECT x AS id, ST_Point(40000 + 10000, -100000 , 27700) AS geom
+FROM generate_series(1,1000000) AS x ;
+
+set max_parallel_workers_per_gather=3;
+set force_parallel_mode=on;
+DROP TABLE IF EXISTS object_list_temp;
+WITH object_list AS (
+	SELECT '#5139'::text AS t, id, to_jsonb(geom) AS json_data
+	FROM a
+	WHERE id::text LIKE '100000%'
+)
+SELECT * INTO TEMPORARY TABLE object_list_temp
+FROM object_list;
+DROP TABLE IF EXISTS object_list;
+SELECT t, id FROM object_list_temp ORDER BY id;
+DROP TABLE IF EXISTS object_list_temp;
+DROP TABLE IF EXISTS a;
+reset max_parallel_workers_per_gather;
+reset force_parallel_mode;
+
+SET client_min_messages TO NOTICE;
diff --git a/regress/core/tickets_expected b/regress/core/tickets_expected
index 43c061191..f9bb75794 100644
--- a/regress/core/tickets_expected
+++ b/regress/core/tickets_expected
@@ -461,3 +461,5 @@ ERROR:  LWGEOM_addpoint: Invalid offset
 #4799|{"type": "Feature", "geometry": {"type":"Point","crs":{"type":"name","properties":{"name":"EPSG:25832"}},"coordinates":[359667,5651729]}, "properties": {"id": 1, "geom1": {"type":"Point","crs":{"type":"name","properties":{"name":"EPSG:3035"}},"coordinates":[4110471,3103061]}}}
 #5008|f|f
 ERROR:  Line has no points
+#5139|100000
+#5139|1000000

commit 37d8bb476129f3caf2410c8f033e09d3bbf13c9b
Author: Regina Obe <lr at pcorp.us>
Date:   Tue Jul 26 10:00:41 2022 -0400

    Use the more standard integer instead of int4.  References #5191 for PostGIS 3.2.3

diff --git a/NEWS b/NEWS
index ecfd9c1b8..db3f28b30 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,7 @@ Additional features are enabled if you are running GEOS 3.9+
 Proj 6.1+, and PostgreSQL 14+.
 
 * Bug Fixes *
+  - #5191, Use integer instead of int4 (Regina Obe)
 
 
 PostGIS 3.2.2
diff --git a/postgis/geography.sql.in b/postgis/geography.sql.in
index 5b4e904ab..024e14528 100644
--- a/postgis/geography.sql.in
+++ b/postgis/geography.sql.in
@@ -106,7 +106,7 @@ CREATE OR REPLACE FUNCTION ST_AsText(geography)
 	_COST_MEDIUM;
 
 -- Availability: 2.5.0
-CREATE OR REPLACE FUNCTION ST_AsText(geography, int4)
+CREATE OR REPLACE FUNCTION ST_AsText(geography, integer)
 	RETURNS TEXT
 	AS 'MODULE_PATHNAME','LWGEOM_asText'
 	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
@@ -206,7 +206,7 @@ CREATE CAST (geography AS geometry) WITH FUNCTION geometry(geography) ;
 -- ---------- ---------- ---------- ---------- ---------- ---------- ----------
 
 -- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION geography_gist_consistent(internal,geography,int4)
+CREATE OR REPLACE FUNCTION geography_gist_consistent(internal,geography,integer)
 	RETURNS bool
 	AS 'MODULE_PATHNAME' ,'gserialized_gist_consistent'
 	LANGUAGE 'c';
@@ -275,7 +275,7 @@ CREATE OPERATOR <-> (
 );
 
 -- Availability: 2.2.0
-CREATE OR REPLACE FUNCTION geography_gist_distance(internal, geography, int4)
+CREATE OR REPLACE FUNCTION geography_gist_distance(internal, geography, integer)
 	RETURNS float8
 	AS 'MODULE_PATHNAME' ,'gserialized_gist_geog_distance'
 	LANGUAGE 'c';
@@ -292,8 +292,8 @@ CREATE OPERATOR CLASS gist_geography_ops
 -- Availability: 2.2.0
 	OPERATOR        13       <-> FOR ORDER BY pg_catalog.float_ops,
 -- Availability: 2.2.0
-	FUNCTION        8        geography_gist_distance (internal, geography, int4),
-	FUNCTION        1        geography_gist_consistent (internal, geography, int4),
+	FUNCTION        8        geography_gist_distance (internal, geography, integer),
+	FUNCTION        1        geography_gist_consistent (internal, geography, integer),
 	FUNCTION        2        geography_gist_union (bytea, internal),
 	FUNCTION        3        geography_gist_compress (internal),
 	FUNCTION        4        geography_gist_decompress (internal),
@@ -404,7 +404,7 @@ CREATE OPERATOR CLASS btree_geography_ops
 --
 
 -- Changed 2.0.0 to use default args and named args
-CREATE OR REPLACE FUNCTION ST_AsSVG(geog geography, rel int4 DEFAULT 0, maxdecimaldigits int4 DEFAULT 15)
+CREATE OR REPLACE FUNCTION ST_AsSVG(geog geography, rel integer DEFAULT 0, maxdecimaldigits integer DEFAULT 15)
 	RETURNS text
 	AS 'MODULE_PATHNAME','geography_as_svg'
 	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
@@ -426,13 +426,13 @@ CREATE OR REPLACE FUNCTION ST_AsSVG(text)
 -- Changed: 2.0.0 to use default args and allow named args
 -- Changed: 2.1.0 enhance to allow id value
 -- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION ST_AsGML(version int4, geog geography, maxdecimaldigits int4 DEFAULT 15, options int4 DEFAULT 0, nprefix text DEFAULT 'gml', id text DEFAULT '')
+CREATE OR REPLACE FUNCTION ST_AsGML(version integer, geog geography, maxdecimaldigits integer DEFAULT 15, options integer DEFAULT 0, nprefix text DEFAULT 'gml', id text DEFAULT '')
 	RETURNS text
 	AS 'MODULE_PATHNAME','geography_as_gml'
 	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
 	_COST_MEDIUM;
 
-CREATE OR REPLACE FUNCTION ST_AsGML(geog geography, maxdecimaldigits int4 DEFAULT 15, options int4 DEFAULT 0, nprefix text DEFAULT 'gml', id text DEFAULT '')
+CREATE OR REPLACE FUNCTION ST_AsGML(geog geography, maxdecimaldigits integer DEFAULT 15, options integer DEFAULT 0, nprefix text DEFAULT 'gml', id text DEFAULT '')
 	RETURNS text
 	AS 'MODULE_PATHNAME','geography_as_gml'
 	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
@@ -452,8 +452,8 @@ CREATE OR REPLACE FUNCTION ST_AsGML(text)
 
 -- AsKML(geography,precision)
 -- Changed: 2.0.0 to use default args and named args
--- Replaces ST_AsKML(geography, int4) deprecated in 2.0.0
-CREATE OR REPLACE FUNCTION ST_AsKML(geog geography, maxdecimaldigits int4 DEFAULT 15, nprefix text DEFAULT '')
+-- Replaces ST_AsKML(geography, integer) deprecated in 2.0.0
+CREATE OR REPLACE FUNCTION ST_AsKML(geog geography, maxdecimaldigits integer DEFAULT 15, nprefix text DEFAULT '')
 	RETURNS text
 	AS 'MODULE_PATHNAME','geography_as_kml'
 	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
@@ -471,7 +471,7 @@ CREATE OR REPLACE FUNCTION ST_AsKML(text)
 -- GeoJson Output
 --
 
-CREATE OR REPLACE FUNCTION ST_AsGeoJson(geog geography, maxdecimaldigits int4 DEFAULT 9, options int4 DEFAULT 0)
+CREATE OR REPLACE FUNCTION ST_AsGeoJson(geog geography, maxdecimaldigits integer DEFAULT 9, options integer DEFAULT 0)
 	RETURNS text
 	AS 'MODULE_PATHNAME','geography_as_geojson'
 	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
@@ -711,7 +711,7 @@ CREATE OR REPLACE FUNCTION ST_AsEWKT(geography)
 	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
 	_COST_MEDIUM;
 
-CREATE OR REPLACE FUNCTION ST_AsEWKT(geography, int4)
+CREATE OR REPLACE FUNCTION ST_AsEWKT(geography, integer)
 	RETURNS TEXT
 	AS 'MODULE_PATHNAME','LWGEOM_asEWKT'
 	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
@@ -738,7 +738,7 @@ CREATE OR REPLACE FUNCTION ST_Summary(geography)
 	_COST_LOW;
 
 -- Availability: 2.1.0
-CREATE OR REPLACE FUNCTION ST_GeoHash(geog geography, maxchars int4 DEFAULT 0)
+CREATE OR REPLACE FUNCTION ST_GeoHash(geog geography, maxchars integer DEFAULT 0)
 	RETURNS TEXT
 	AS 'MODULE_PATHNAME', 'ST_GeoHash'
 	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
@@ -746,13 +746,13 @@ CREATE OR REPLACE FUNCTION ST_GeoHash(geog geography, maxchars int4 DEFAULT 0)
 
 -- Availability: 2.2.0
 CREATE OR REPLACE FUNCTION ST_SRID(geog geography)
-	RETURNS int4
+	RETURNS integer
 	AS 'MODULE_PATHNAME', 'LWGEOM_get_srid'
 	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
 	_COST_LOW;
 
 -- Availability: 2.2.0
-CREATE OR REPLACE FUNCTION ST_SetSRID(geog geography, srid int4)
+CREATE OR REPLACE FUNCTION ST_SetSRID(geog geography, srid integer)
 	RETURNS geography
 	AS 'MODULE_PATHNAME', 'LWGEOM_set_srid'
 	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
diff --git a/postgis/legacy.sql.in b/postgis/legacy.sql.in
index c90452aee..9c90a154a 100644
--- a/postgis/legacy.sql.in
+++ b/postgis/legacy.sql.in
@@ -23,12 +23,12 @@ CREATE OR REPLACE FUNCTION hasbbox(geometry)
 
 -- Availability: 1.2.2 -- never deprecated but don't think anyone uses it
 CREATE OR REPLACE FUNCTION getsrid(geometry)
-	RETURNS int4
+	RETURNS integer
 	AS 'MODULE_PATHNAME','LWGEOM_get_srid'
 	LANGUAGE 'c' IMMUTABLE STRICT;
 
 -- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION GeometryFromText(text, int4)
+CREATE OR REPLACE FUNCTION GeometryFromText(text, integer)
 	RETURNS geometry
 	AS 'MODULE_PATHNAME','LWGEOM_from_text'
 	LANGUAGE 'c' IMMUTABLE STRICT;
@@ -597,14 +597,14 @@ CREATE OR REPLACE FUNCTION AsGML(geometry)
 	LANGUAGE 'sql' IMMUTABLE STRICT;
 
 -- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION AsGML(geometry, int4)
+CREATE OR REPLACE FUNCTION AsGML(geometry, integer)
 	RETURNS TEXT
 	AS 'SELECT _ST_AsGML(2, $1, $2, 0, null, null)'
 	LANGUAGE 'sql' IMMUTABLE STRICT;
 
 -- AsKML(geom, precision) / version=2
 -- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION AsKML(geometry, int4)
+CREATE OR REPLACE FUNCTION AsKML(geometry, integer)
 	RETURNS TEXT
 	AS 'SELECT ST_AsKML(ST_transform($1,4326), $2, null)'
 	LANGUAGE 'sql' IMMUTABLE STRICT;
@@ -618,7 +618,7 @@ CREATE OR REPLACE FUNCTION AsKML(geometry)
 
 -- AsKML(version, geom, precision)
 -- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION AsKML(int4, geometry, int4)
+CREATE OR REPLACE FUNCTION AsKML(integer, geometry, integer)
 	RETURNS TEXT
 	AS 'SELECT ST_AsKML(ST_Transform($2,4326), $3, null)'
 	LANGUAGE 'sql' IMMUTABLE STRICT;
@@ -642,13 +642,13 @@ CREATE OR REPLACE FUNCTION AsSVG(geometry)
 	LANGUAGE 'c' IMMUTABLE STRICT;
 
 -- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION AsSVG(geometry,int4)
+CREATE OR REPLACE FUNCTION AsSVG(geometry,integer)
 	RETURNS TEXT
 	AS 'MODULE_PATHNAME','LWGEOM_asSVG'
 	LANGUAGE 'c' IMMUTABLE STRICT;
 
 -- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION AsSVG(geometry,int4,int4)
+CREATE OR REPLACE FUNCTION AsSVG(geometry,integer,integer)
 	RETURNS TEXT
 	AS 'MODULE_PATHNAME','LWGEOM_asSVG'
 	LANGUAGE 'c' IMMUTABLE STRICT;
@@ -778,7 +778,7 @@ CREATE OR REPLACE FUNCTION difference(geometry,geometry)
 
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION Dimension(geometry)
-	RETURNS int4
+	RETURNS integer
 	AS 'MODULE_PATHNAME', 'LWGEOM_dimension'
 	LANGUAGE 'c' IMMUTABLE STRICT;
 
@@ -934,7 +934,7 @@ CREATE OR REPLACE FUNCTION ForceRHR(geometry)
 	LANGUAGE 'c' IMMUTABLE STRICT;
 
 -- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION GeomCollFromText(text, int4)
+CREATE OR REPLACE FUNCTION GeomCollFromText(text, integer)
 	RETURNS geometry
 	AS '
 	SELECT CASE
@@ -1178,7 +1178,7 @@ CREATE OR REPLACE FUNCTION LineFromText(text)
 	LANGUAGE 'sql' IMMUTABLE STRICT;
 
 -- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION LineFromText(text, int4)
+CREATE OR REPLACE FUNCTION LineFromText(text, integer)
 	RETURNS geometry
 	AS '
 	SELECT CASE WHEN geometrytype(GeomFromText($1, $2)) = ''LINESTRING''
@@ -1220,7 +1220,7 @@ CREATE OR REPLACE FUNCTION LineStringFromText(text)
 	LANGUAGE 'sql' IMMUTABLE STRICT;
 
 -- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION LineStringFromText(text, int4)
+CREATE OR REPLACE FUNCTION LineStringFromText(text, integer)
 	RETURNS geometry
 	AS 'SELECT LineFromText($1, $2)'
 	LANGUAGE 'sql' IMMUTABLE STRICT;
@@ -1316,12 +1316,12 @@ CREATE OR REPLACE FUNCTION max_distance(geometry,geometry)
 
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION mem_size(geometry)
-	RETURNS int4
+	RETURNS integer
 	AS 'MODULE_PATHNAME', 'LWGEOM_mem_size'
 	LANGUAGE 'c' IMMUTABLE STRICT;
 
 -- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION MLineFromText(text, int4)
+CREATE OR REPLACE FUNCTION MLineFromText(text, integer)
 	RETURNS geometry
 	AS '
 	SELECT CASE
@@ -1362,7 +1362,7 @@ CREATE OR REPLACE FUNCTION MLineFromWKB(bytea)
 	LANGUAGE 'sql' IMMUTABLE STRICT;
 
 -- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION MPointFromText(text, int4)
+CREATE OR REPLACE FUNCTION MPointFromText(text, integer)
 	RETURNS geometry
 	AS '
 	SELECT CASE WHEN geometrytype(GeomFromText($1,$2)) = ''MULTIPOINT''
@@ -1402,7 +1402,7 @@ CREATE OR REPLACE FUNCTION MPointFromWKB(bytea)
 	LANGUAGE 'sql' IMMUTABLE STRICT;
 
 -- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION MPolyFromText(text, int4)
+CREATE OR REPLACE FUNCTION MPolyFromText(text, integer)
 	RETURNS geometry
 	AS '
 	SELECT CASE WHEN geometrytype(GeomFromText($1, $2)) = ''MULTIPOLYGON''
@@ -1468,7 +1468,7 @@ CREATE OR REPLACE FUNCTION MultiLineStringFromText(text)
 	LANGUAGE 'sql' IMMUTABLE STRICT;
 
 -- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION MultiLineStringFromText(text, int4)
+CREATE OR REPLACE FUNCTION MultiLineStringFromText(text, integer)
 	RETURNS geometry
 	AS 'SELECT MLineFromText($1, $2)'
 	LANGUAGE 'sql' IMMUTABLE STRICT;
@@ -1486,7 +1486,7 @@ CREATE OR REPLACE FUNCTION MultiPointFromText(text)
 	LANGUAGE 'sql' IMMUTABLE STRICT;
 
 -- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION MultiPointFromText(text, int4)
+CREATE OR REPLACE FUNCTION MultiPointFromText(text, integer)
 	RETURNS geometry
 	AS 'SELECT MPointFromText($1, $2)'
 	LANGUAGE 'sql' IMMUTABLE STRICT;
@@ -1512,7 +1512,7 @@ CREATE OR REPLACE FUNCTION MultiPointFromWKB(bytea)
 	LANGUAGE 'sql' IMMUTABLE STRICT;
 
 -- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION MultiPolygonFromText(text, int4)
+CREATE OR REPLACE FUNCTION MultiPolygonFromText(text, integer)
 	RETURNS geometry
 	AS 'SELECT MPolyFromText($1, $2)'
 	LANGUAGE 'sql' IMMUTABLE STRICT;
@@ -1537,25 +1537,25 @@ CREATE OR REPLACE FUNCTION NumInteriorRings(geometry)
 
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION npoints(geometry)
-	RETURNS int4
+	RETURNS integer
 	AS 'MODULE_PATHNAME', 'LWGEOM_npoints'
 	LANGUAGE 'c' IMMUTABLE STRICT;
 
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION nrings(geometry)
-	RETURNS int4
+	RETURNS integer
 	AS 'MODULE_PATHNAME', 'LWGEOM_nrings'
 	LANGUAGE 'c' IMMUTABLE STRICT;
 
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION NumGeometries(geometry)
-	RETURNS int4
+	RETURNS integer
 	AS 'MODULE_PATHNAME', 'LWGEOM_numgeometries_collection'
 	LANGUAGE 'c' IMMUTABLE STRICT;
 
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION NumPoints(geometry)
-	RETURNS int4
+	RETURNS integer
 	AS 'MODULE_PATHNAME', 'LWGEOM_numpoints_linestring'
 	LANGUAGE 'c' IMMUTABLE STRICT;
 
@@ -1596,7 +1596,7 @@ CREATE OR REPLACE FUNCTION PointFromText(text)
 	LANGUAGE 'sql' IMMUTABLE STRICT;
 
 -- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION PointFromText(text, int4)
+CREATE OR REPLACE FUNCTION PointFromText(text, integer)
 	RETURNS geometry
 	AS '
 	SELECT CASE WHEN geometrytype(GeomFromText($1, $2)) = ''POINT''
@@ -1647,7 +1647,7 @@ CREATE OR REPLACE FUNCTION PolyFromText(text)
 	'
 	LANGUAGE 'sql' IMMUTABLE STRICT;
 -- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION PolyFromText(text, int4)
+CREATE OR REPLACE FUNCTION PolyFromText(text, integer)
 	RETURNS geometry
 	AS '
 	SELECT CASE WHEN geometrytype(GeomFromText($1, $2)) = ''POLYGON''
@@ -1677,7 +1677,7 @@ CREATE OR REPLACE FUNCTION PolyFromWKB(bytea)
 	LANGUAGE 'sql' IMMUTABLE STRICT;
 
 -- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION PolygonFromText(text, int4)
+CREATE OR REPLACE FUNCTION PolygonFromText(text, integer)
 	RETURNS geometry
 	AS 'SELECT PolyFromText($1, $2)'
 	LANGUAGE 'sql' IMMUTABLE STRICT;
@@ -1950,7 +1950,7 @@ CREATE OR REPLACE FUNCTION ST_find_extent(text,text)
 -- Availability: 1.2.2
 -- Deprecation in 2.2.0
 CREATE OR REPLACE FUNCTION ST_mem_size(geometry)
-	RETURNS int4 AS
+	RETURNS integer AS
   	'SELECT ST_MemSize($1);'
 	LANGUAGE 'sql' IMMUTABLE STRICT SECURITY INVOKER;
 
@@ -2191,22 +2191,22 @@ CREATE AGGREGATE ST_Extent3D(
 -- Versioned Format Export Functions --
 ------------------------------------------------
 
-CREATE OR REPLACE FUNCTION ST_AsGeoJson(version int4, geog geography, maxdecimaldigits int4 DEFAULT 15, options int4 DEFAULT 0)
+CREATE OR REPLACE FUNCTION ST_AsGeoJson(version integer, geog geography, maxdecimaldigits integer DEFAULT 15, options integer DEFAULT 0)
 	RETURNS text AS
 	$$ SELECT ST_AsGeoJson($2::geometry,$3,$4); $$
 	LANGUAGE 'sql' IMMUTABLE STRICT;
 
-CREATE OR REPLACE FUNCTION ST_AsGeoJson(version int4, geog geometry, maxdecimaldigits int4 DEFAULT 15, options int4 DEFAULT 0)
+CREATE OR REPLACE FUNCTION ST_AsGeoJson(version integer, geog geometry, maxdecimaldigits integer DEFAULT 15, options integer DEFAULT 0)
 	RETURNS text AS
 	$$ SELECT ST_AsGeoJson($2::geometry,15,0); $$
 	LANGUAGE 'sql' IMMUTABLE STRICT;
 
-CREATE OR REPLACE FUNCTION ST_AsKML(version int4, geom geography, maxdecimaldigits int4 DEFAULT 15, nprefix TEXT default '')
+CREATE OR REPLACE FUNCTION ST_AsKML(version integer, geom geography, maxdecimaldigits integer DEFAULT 15, nprefix TEXT default '')
 	RETURNS text AS
 	$$ SELECT ST_AsKML($2::geometry,$3,$4); $$
 	LANGUAGE 'sql' IMMUTABLE STRICT;
 
-CREATE OR REPLACE FUNCTION ST_AsKML(version int4, geom geometry, maxdecimaldigits int4 DEFAULT 15, nprefix TEXT default '')
+CREATE OR REPLACE FUNCTION ST_AsKML(version integer, geom geometry, maxdecimaldigits integer DEFAULT 15, nprefix TEXT default '')
 	RETURNS text AS
 	$$ SELECT ST_AsKML($2::geometry,$3,$4); $$
 	LANGUAGE 'sql' IMMUTABLE STRICT;
diff --git a/postgis/legacy_gist.sql.in b/postgis/legacy_gist.sql.in
index ec9110b71..a9780cd0e 100644
--- a/postgis/legacy_gist.sql.in
+++ b/postgis/legacy_gist.sql.in
@@ -16,9 +16,9 @@ CREATE OPERATOR CLASS gist_geometry_ops
 
 	OPERATOR        13       <-> FOR ORDER BY pg_catalog.float_ops,
 	OPERATOR        14       <#> FOR ORDER BY pg_catalog.float_ops,
-	FUNCTION        8        geometry_gist_distance_2d (internal, geometry, int4),
+	FUNCTION        8        geometry_gist_distance_2d (internal, geometry, integer),
 
-	FUNCTION        1        geometry_gist_consistent_2d (internal, geometry, int4),
+	FUNCTION        1        geometry_gist_consistent_2d (internal, geometry, integer),
 	FUNCTION        2        geometry_gist_union_2d (bytea, internal),
 	FUNCTION        3        geometry_gist_compress_2d (internal),
 	FUNCTION        4        geometry_gist_decompress_2d (internal),
diff --git a/postgis/legacy_minimal.sql.in b/postgis/legacy_minimal.sql.in
index 9a32792a6..5903fc54a 100644
--- a/postgis/legacy_minimal.sql.in
+++ b/postgis/legacy_minimal.sql.in
@@ -33,7 +33,7 @@ CREATE OR REPLACE FUNCTION Estimated_Extent(text,text) RETURNS box2d AS
 	LANGUAGE 'c' IMMUTABLE STRICT SECURITY DEFINER;
 
 -- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION GeomFromText(text, int4)
+CREATE OR REPLACE FUNCTION GeomFromText(text, integer)
 	RETURNS geometry AS 'SELECT ST_GeomFromText($1, $2)'
 	LANGUAGE 'sql' IMMUTABLE STRICT;
 
@@ -49,14 +49,14 @@ CREATE OR REPLACE FUNCTION ndims(geometry)
 	LANGUAGE 'c' IMMUTABLE STRICT;
 
 -- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION SetSRID(geometry,int4)
+CREATE OR REPLACE FUNCTION SetSRID(geometry,integer)
 	RETURNS geometry
 	AS 'MODULE_PATHNAME','LWGEOM_set_srid'
 	LANGUAGE 'c' IMMUTABLE STRICT;
 
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION SRID(geometry)
-	RETURNS int4
+	RETURNS integer
 	AS 'MODULE_PATHNAME','LWGEOM_get_srid'
 	LANGUAGE 'c' IMMUTABLE STRICT;
 
diff --git a/postgis/postgis.sql.in b/postgis/postgis.sql.in
index 7ca2f60b7..21e49beba 100644
--- a/postgis/postgis.sql.in
+++ b/postgis/postgis.sql.in
@@ -486,13 +486,13 @@ CREATE OPERATOR CLASS hash_geometry_ops
 -- ---------- ---------- ---------- ---------- ---------- ---------- ----------
 
 -- Availability: 2.0.0
-CREATE OR REPLACE FUNCTION geometry_gist_distance_2d(internal,geometry,int4)
+CREATE OR REPLACE FUNCTION geometry_gist_distance_2d(internal,geometry,integer)
 	RETURNS float8
 	AS 'MODULE_PATHNAME' ,'gserialized_gist_distance_2d'
 	LANGUAGE 'c' PARALLEL SAFE;
 
 -- Availability: 2.0.0
-CREATE OR REPLACE FUNCTION geometry_gist_consistent_2d(internal,geometry,int4)
+CREATE OR REPLACE FUNCTION geometry_gist_consistent_2d(internal,geometry,integer)
 	RETURNS bool
 	AS 'MODULE_PATHNAME' ,'gserialized_gist_consistent_2d'
 	LANGUAGE 'c' PARALLEL SAFE;
@@ -578,13 +578,13 @@ CREATE OR REPLACE FUNCTION _postgis_index_extent(tbl regclass, col text)
 	LANGUAGE 'c' STABLE STRICT;
 
 -- Availability: 2.1.0
-CREATE OR REPLACE FUNCTION gserialized_gist_sel_2d (internal, oid, internal, int4)
+CREATE OR REPLACE FUNCTION gserialized_gist_sel_2d (internal, oid, internal, integer)
 	RETURNS float8
 	AS 'MODULE_PATHNAME', 'gserialized_gist_sel_2d'
 	LANGUAGE 'c' PARALLEL SAFE;
 
 -- Availability: 2.1.0
-CREATE OR REPLACE FUNCTION gserialized_gist_sel_nd (internal, oid, internal, int4)
+CREATE OR REPLACE FUNCTION gserialized_gist_sel_nd (internal, oid, internal, integer)
 	RETURNS float8
 	AS 'MODULE_PATHNAME', 'gserialized_gist_sel_nd'
 	LANGUAGE 'c' PARALLEL SAFE;
@@ -840,8 +840,8 @@ CREATE OPERATOR CLASS gist_geometry_ops_2d
 --	FUNCTION        11       geometry_gist_sortsupport_2d (internal),
 -- #endif
 --
-	FUNCTION        8        geometry_gist_distance_2d (internal, geometry, int4),
-	FUNCTION        1        geometry_gist_consistent_2d (internal, geometry, int4),
+	FUNCTION        8        geometry_gist_distance_2d (internal, geometry, integer),
+	FUNCTION        1        geometry_gist_consistent_2d (internal, geometry, integer),
 	FUNCTION        2        geometry_gist_union_2d (bytea, internal),
 	FUNCTION        3        geometry_gist_compress_2d (internal),
 	FUNCTION        4        geometry_gist_decompress_2d (internal),
@@ -858,7 +858,7 @@ CREATE OPERATOR CLASS gist_geometry_ops_2d
 -- ---------- ---------- ---------- ---------- ---------- ---------- ----------
 
 -- Availability: 2.0.0
-CREATE OR REPLACE FUNCTION geometry_gist_consistent_nd(internal,geometry,int4)
+CREATE OR REPLACE FUNCTION geometry_gist_consistent_nd(internal,geometry,integer)
 	RETURNS bool
 	AS 'MODULE_PATHNAME' ,'gserialized_gist_consistent'
 	LANGUAGE 'c' PARALLEL SAFE
@@ -1003,7 +1003,7 @@ CREATE OPERATOR |=| (
 );
 
 -- Availability: 2.2.0
-CREATE OR REPLACE FUNCTION geometry_gist_distance_nd(internal,geometry,int4)
+CREATE OR REPLACE FUNCTION geometry_gist_distance_nd(internal,geometry,integer)
 	RETURNS float8
 	AS 'MODULE_PATHNAME', 'gserialized_gist_distance'
 	LANGUAGE 'c' PARALLEL SAFE
@@ -1025,8 +1025,8 @@ CREATE OPERATOR CLASS gist_geometry_ops_nd
 	-- Availability: 2.2.0
 	OPERATOR        20       |=| FOR ORDER BY pg_catalog.float_ops,
 	-- Availability: 2.2.0
-	FUNCTION        8        geometry_gist_distance_nd (internal, geometry, int4),
-	FUNCTION        1        geometry_gist_consistent_nd (internal, geometry, int4),
+	FUNCTION        8        geometry_gist_distance_nd (internal, geometry, integer),
+	FUNCTION        1        geometry_gist_consistent_nd (internal, geometry, integer),
 	FUNCTION        2        geometry_gist_union_nd (bytea, internal),
 	FUNCTION        3        geometry_gist_compress_nd (internal),
 	FUNCTION        4        geometry_gist_decompress_nd (internal),
@@ -1227,7 +1227,7 @@ CREATE OR REPLACE FUNCTION ST_QuantizeCoordinates(g geometry, prec_x int, prec_y
 
 -- Availability: 2.2.0
 CREATE OR REPLACE FUNCTION ST_MemSize(geometry)
-	RETURNS int4
+	RETURNS integer
 	AS 'MODULE_PATHNAME', 'LWGEOM_mem_size'
 	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
 	_COST_DEFAULT;
@@ -1241,14 +1241,14 @@ CREATE OR REPLACE FUNCTION ST_Summary(geometry)
 
 -- Availability: 1.2.2
 CREATE OR REPLACE FUNCTION ST_NPoints(geometry)
-	RETURNS int4
+	RETURNS integer
 	AS 'MODULE_PATHNAME', 'LWGEOM_npoints'
 	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
 	_COST_LOW;
 
 -- Availability: 1.2.2
 CREATE OR REPLACE FUNCTION ST_NRings(geometry)
-	RETURNS int4
+	RETURNS integer
 	AS 'MODULE_PATHNAME', 'LWGEOM_nrings'
 	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
 	_COST_LOW;
@@ -1613,21 +1613,21 @@ CREATE OR REPLACE FUNCTION ST_AsEWKT(geometry)
 	_COST_MEDIUM;
 
 -- Availability: 3.1.0
-CREATE OR REPLACE FUNCTION ST_AsEWKT(geometry, int4)
+CREATE OR REPLACE FUNCTION ST_AsEWKT(geometry, integer)
 	RETURNS TEXT
 	AS 'MODULE_PATHNAME','LWGEOM_asEWKT'
 	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
 	_COST_MEDIUM;
 
 -- Availability: 2.2.0
-CREATE OR REPLACE FUNCTION ST_AsTWKB(geom geometry, prec int4 default NULL, prec_z int4 default NULL, prec_m int4 default NULL, with_sizes boolean default NULL, with_boxes boolean default NULL)
+CREATE OR REPLACE FUNCTION ST_AsTWKB(geom geometry, prec integer default NULL, prec_z integer default NULL, prec_m integer default NULL, with_sizes boolean default NULL, with_boxes boolean default NULL)
 	RETURNS bytea
 	AS 'MODULE_PATHNAME','TWKBFromLWGEOM'
 	LANGUAGE 'c' IMMUTABLE PARALLEL SAFE
 	_COST_LOW;
 
 -- Availability: 2.2.0
-CREATE OR REPLACE FUNCTION ST_AsTWKB(geom geometry[], ids bigint[], prec int4 default NULL, prec_z int4 default NULL, prec_m int4 default NULL, with_sizes boolean default NULL, with_boxes boolean default NULL)
+CREATE OR REPLACE FUNCTION ST_AsTWKB(geom geometry[], ids bigint[], prec integer default NULL, prec_z integer default NULL, prec_m integer default NULL, with_sizes boolean default NULL, with_boxes boolean default NULL)
 	RETURNS bytea
 	AS 'MODULE_PATHNAME','TWKBFromLWGEOMArray'
 	LANGUAGE 'c' IMMUTABLE PARALLEL SAFE
@@ -2774,12 +2774,12 @@ LANGUAGE 'plpgsql' VOLATILE STRICT;
 -- FIND_SRID( <schema>, <table>, <geom col> )
 -----------------------------------------------------------------------
 -- Changed: 2.1.8 improve performance
-CREATE OR REPLACE FUNCTION find_srid(varchar,varchar,varchar) RETURNS int4 AS
+CREATE OR REPLACE FUNCTION find_srid(varchar,varchar,varchar) RETURNS integer AS
 $$
 DECLARE
 	schem varchar =  $1;
 	tabl varchar = $2;
-	sr int4;
+	sr integer;
 BEGIN
 -- if the table contains a . and the schema is empty
 -- split the table into a schema and a table
@@ -2811,14 +2811,14 @@ CREATE OR REPLACE FUNCTION get_proj4_from_srid(integer) RETURNS text AS
 	LANGUAGE 'plpgsql' IMMUTABLE STRICT PARALLEL SAFE;
 
 -- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_SetSRID(geom geometry, srid int4)
+CREATE OR REPLACE FUNCTION ST_SetSRID(geom geometry, srid integer)
 	RETURNS geometry
 	AS 'MODULE_PATHNAME','LWGEOM_set_srid'
 	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
 	_COST_DEFAULT;
 
 CREATE OR REPLACE FUNCTION ST_SRID(geom geometry)
-	RETURNS int4
+	RETURNS integer
 	AS 'MODULE_PATHNAME','LWGEOM_get_srid'
 	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
 	_COST_DEFAULT;
@@ -3604,14 +3604,14 @@ CREATE TYPE valid_detail AS (
 );
 
 -- Availability: 2.0.0
-CREATE OR REPLACE FUNCTION ST_IsValidDetail(geom geometry, flags int4 DEFAULT 0)
+CREATE OR REPLACE FUNCTION ST_IsValidDetail(geom geometry, flags integer DEFAULT 0)
 	RETURNS valid_detail
 	AS 'MODULE_PATHNAME', 'isvaliddetail'
 	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
 	_COST_HIGH;
 
 -- Availability: 2.0.0
-CREATE OR REPLACE FUNCTION ST_IsValidReason(geometry, int4)
+CREATE OR REPLACE FUNCTION ST_IsValidReason(geometry, integer)
 	RETURNS text
 	AS $$
 	SELECT CASE WHEN valid THEN 'Valid Geometry' ELSE reason END FROM (
@@ -3622,7 +3622,7 @@ CREATE OR REPLACE FUNCTION ST_IsValidReason(geometry, int4)
 	_COST_HIGH;
 
 -- Availability: 2.0.0
-CREATE OR REPLACE FUNCTION ST_IsValid(geometry, int4)
+CREATE OR REPLACE FUNCTION ST_IsValid(geometry, integer)
 	RETURNS boolean
 	AS 'SELECT (@extschema at .ST_isValidDetail($1, $2)).valid'
 	LANGUAGE 'sql' IMMUTABLE STRICT PARALLEL SAFE
@@ -3890,7 +3890,7 @@ CREATE OR REPLACE FUNCTION ST_Node(g geometry)
 -- ST_DelaunayTriangles
 --------------------------------------------------------------------------------
 
--- ST_DelaunayTriangles(g1 geometry, tolerance float8, flags int4)
+-- ST_DelaunayTriangles(g1 geometry, tolerance float8, flags integer)
 --
 -- Builds Delaunay triangulation out of geometry vertices.
 --
@@ -3903,7 +3903,7 @@ CREATE OR REPLACE FUNCTION ST_Node(g geometry)
 --
 -- Availability: 2.1.0
 --
-CREATE OR REPLACE FUNCTION ST_DelaunayTriangles(g1 geometry, tolerance float8 DEFAULT 0.0, flags int4 DEFAULT 0)
+CREATE OR REPLACE FUNCTION ST_DelaunayTriangles(g1 geometry, tolerance float8 DEFAULT 0.0, flags integer DEFAULT 0)
 	RETURNS geometry
 	AS 'MODULE_PATHNAME', 'ST_DelaunayTriangles'
 	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
@@ -4201,7 +4201,7 @@ CREATE OR REPLACE FUNCTION ST_Relate(geom1 geometry, geom2 geometry)
 	_COST_HIGH;
 
 -- Availability: 2.0.0
-CREATE OR REPLACE FUNCTION ST_Relate(geom1 geometry, geom2 geometry, int4)
+CREATE OR REPLACE FUNCTION ST_Relate(geom1 geometry, geom2 geometry, integer)
 	RETURNS text
 	AS 'MODULE_PATHNAME','relate_full'
 	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
@@ -4660,14 +4660,14 @@ CREATE OR REPLACE FUNCTION Equals(geom1 geometry, geom2 geometry)
 -----------------------------------------------------------------------
 -- GML & KML INPUT
 -----------------------------------------------------------------------
-CREATE OR REPLACE FUNCTION _ST_GeomFromGML(text, int4)
+CREATE OR REPLACE FUNCTION _ST_GeomFromGML(text, integer)
 	RETURNS geometry
 	AS 'MODULE_PATHNAME','geom_from_gml'
 	LANGUAGE 'c' IMMUTABLE PARALLEL SAFE
 	_COST_MEDIUM;
 
 -- Availability: 2.0.0
-CREATE OR REPLACE FUNCTION ST_GeomFromGML(text, int4)
+CREATE OR REPLACE FUNCTION ST_GeomFromGML(text, integer)
 	RETURNS geometry
 	AS 'MODULE_PATHNAME','geom_from_gml'
 	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
@@ -4688,7 +4688,7 @@ CREATE OR REPLACE FUNCTION ST_GMLToSQL(text)
 	_COST_MEDIUM;
 
 -- Availability: 2.0.0
-CREATE OR REPLACE FUNCTION ST_GMLToSQL(text, int4)
+CREATE OR REPLACE FUNCTION ST_GMLToSQL(text, integer)
 	RETURNS geometry
 	AS 'MODULE_PATHNAME','geom_from_gml'
 	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
@@ -4735,8 +4735,8 @@ CREATE OR REPLACE FUNCTION postgis_libjson_version()
 -- ENCODED POLYLINE INPUT
 -----------------------------------------------------------------------
 -- Availability: 2.2.0
--- ST_LineFromEncodedPolyline(polyline text, precision int4)
-CREATE OR REPLACE FUNCTION ST_LineFromEncodedPolyline(txtin text, nprecision int4 DEFAULT 5)
+-- ST_LineFromEncodedPolyline(polyline text, precision integer)
+CREATE OR REPLACE FUNCTION ST_LineFromEncodedPolyline(txtin text, nprecision integer DEFAULT 5)
 	RETURNS geometry
 	AS 'MODULE_PATHNAME','line_from_encoded_polyline'
 	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
@@ -4748,8 +4748,8 @@ CREATE OR REPLACE FUNCTION ST_LineFromEncodedPolyline(txtin text, nprecision int
 -- ENCODED POLYLINE OUTPUT
 -----------------------------------------------------------------------
 -- Availability: 2.2.0
--- ST_AsEncodedPolyline(geom geometry, precision int4)
-CREATE OR REPLACE FUNCTION ST_AsEncodedPolyline(geom geometry, nprecision int4 DEFAULT 5)
+-- ST_AsEncodedPolyline(geom geometry, precision integer)
+CREATE OR REPLACE FUNCTION ST_AsEncodedPolyline(geom geometry, nprecision integer DEFAULT 5)
 	RETURNS TEXT
 	AS 'MODULE_PATHNAME','LWGEOM_asEncodedPolyline'
 	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
@@ -4762,7 +4762,7 @@ CREATE OR REPLACE FUNCTION ST_AsEncodedPolyline(geom geometry, nprecision int4 D
 -----------------------------------------------------------------------
 -- Availability: 1.2.2
 -- Changed: 2.0.0 changed to use default args and allow calling by named args
-CREATE OR REPLACE FUNCTION ST_AsSVG(geom geometry, rel int4 DEFAULT 0, maxdecimaldigits int4 DEFAULT 15)
+CREATE OR REPLACE FUNCTION ST_AsSVG(geom geometry, rel integer DEFAULT 0, maxdecimaldigits integer DEFAULT 15)
 	RETURNS TEXT
 	AS 'MODULE_PATHNAME','LWGEOM_asSVG'
 	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
@@ -4772,7 +4772,7 @@ CREATE OR REPLACE FUNCTION ST_AsSVG(geom geometry, rel int4 DEFAULT 0, maxdecima
 -- GML OUTPUT
 -----------------------------------------------------------------------
 -- _ST_AsGML(version, geom, precision, option, prefix, id)
-CREATE OR REPLACE FUNCTION _ST_AsGML(int4, geometry, int4, int4, text, text)
+CREATE OR REPLACE FUNCTION _ST_AsGML(integer, geometry, integer, integer, text, text)
 	RETURNS TEXT
 	AS 'MODULE_PATHNAME','LWGEOM_asGML'
 	LANGUAGE 'c' IMMUTABLE PARALLEL SAFE
@@ -4786,7 +4786,7 @@ CREATE OR REPLACE FUNCTION _ST_AsGML(int4, geometry, int4, int4, text, text)
 -- ST_AsGML (geom, precision, option) / version=2
 -- Availability: 1.4.0
 -- Changed: 2.0.0 to have default args
-CREATE OR REPLACE FUNCTION ST_AsGML(geom geometry, maxdecimaldigits int4 DEFAULT 15, options int4 DEFAULT 0)
+CREATE OR REPLACE FUNCTION ST_AsGML(geom geometry, maxdecimaldigits integer DEFAULT 15, options integer DEFAULT 0)
 	RETURNS TEXT
 	AS 'MODULE_PATHNAME','LWGEOM_asGML'
 	LANGUAGE 'c' IMMUTABLE PARALLEL SAFE
@@ -4799,7 +4799,7 @@ CREATE OR REPLACE FUNCTION ST_AsGML(geom geometry, maxdecimaldigits int4 DEFAULT
 -- Changed: 2.0.0 to use default and named args
 -- ST_AsGML(version, geom, precision, option, prefix, id)
 -- Availability: 2.1.0
-CREATE OR REPLACE FUNCTION ST_AsGML(version int4, geom geometry, maxdecimaldigits int4 DEFAULT 15, options int4 DEFAULT 0, nprefix text DEFAULT null, id text DEFAULT null)
+CREATE OR REPLACE FUNCTION ST_AsGML(version integer, geom geometry, maxdecimaldigits integer DEFAULT 15, options integer DEFAULT 0, nprefix text DEFAULT null, id text DEFAULT null)
 	RETURNS TEXT
 	AS 'MODULE_PATHNAME','LWGEOM_asGML'
 	LANGUAGE 'c' IMMUTABLE PARALLEL SAFE
@@ -4811,8 +4811,8 @@ CREATE OR REPLACE FUNCTION ST_AsGML(version int4, geom geometry, maxdecimaldigit
 
 -- Availability: 1.2.2
 -- Changed: 2.0.0 to use default args and allow named args
--- Replaces ST_AsKML(geometry, int4) deprecated in 2.0.0
-CREATE OR REPLACE FUNCTION ST_AsKML(geom geometry, maxdecimaldigits int4 DEFAULT 15, nprefix TEXT default '')
+-- Replaces ST_AsKML(geometry, integer) deprecated in 2.0.0
+CREATE OR REPLACE FUNCTION ST_AsKML(geom geometry, maxdecimaldigits integer DEFAULT 15, nprefix TEXT default '')
 	RETURNS TEXT
 	AS 'MODULE_PATHNAME','LWGEOM_asKML'
 	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
@@ -4826,14 +4826,14 @@ CREATE OR REPLACE FUNCTION ST_AsKML(geom geometry, maxdecimaldigits int4 DEFAULT
 -- ST_AsGeoJson(geom, precision, options) / version=1
 -- Changed: 2.0.0 to use default args and named args
 -- Changed: 3.0.0 change default args mode
-CREATE OR REPLACE FUNCTION ST_AsGeoJson(geom geometry, maxdecimaldigits int4 DEFAULT 9, options int4 DEFAULT 8)
+CREATE OR REPLACE FUNCTION ST_AsGeoJson(geom geometry, maxdecimaldigits integer DEFAULT 9, options integer DEFAULT 8)
 	RETURNS text
 	AS 'MODULE_PATHNAME','LWGEOM_asGeoJson'
 	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
 	_COST_MEDIUM;
 
 -- Availability: 3.0.0
-CREATE OR REPLACE FUNCTION ST_AsGeoJson(r record, geom_column text DEFAULT '', maxdecimaldigits int4 DEFAULT 9, pretty_bool bool DEFAULT false)
+CREATE OR REPLACE FUNCTION ST_AsGeoJson(r record, geom_column text DEFAULT '', maxdecimaldigits integer DEFAULT 9, pretty_bool bool DEFAULT false)
 	RETURNS text
 	AS 'MODULE_PATHNAME','ST_AsGeoJsonRow'
 	LANGUAGE 'c' STABLE STRICT PARALLEL SAFE
@@ -4878,21 +4878,21 @@ CREATE OR REPLACE FUNCTION pgis_asmvt_transfn(internal, anyelement, text)
 	_COST_MEDIUM;
 
 -- Availability: 2.4.0
-CREATE OR REPLACE FUNCTION pgis_asmvt_transfn(internal, anyelement, text, int4)
+CREATE OR REPLACE FUNCTION pgis_asmvt_transfn(internal, anyelement, text, integer)
 	RETURNS internal
 	AS 'MODULE_PATHNAME', 'pgis_asmvt_transfn'
 	LANGUAGE 'c' IMMUTABLE PARALLEL SAFE
 	_COST_MEDIUM;
 
 -- Availability: 2.4.0
-CREATE OR REPLACE FUNCTION pgis_asmvt_transfn(internal, anyelement, text, int4, text)
+CREATE OR REPLACE FUNCTION pgis_asmvt_transfn(internal, anyelement, text, integer, text)
 	RETURNS internal
 	AS 'MODULE_PATHNAME', 'pgis_asmvt_transfn'
 	LANGUAGE 'c' IMMUTABLE PARALLEL SAFE
 	_COST_MEDIUM;
 
 -- Availability: 3.0.0
-CREATE OR REPLACE FUNCTION pgis_asmvt_transfn(internal, anyelement, text, int4, text, text)
+CREATE OR REPLACE FUNCTION pgis_asmvt_transfn(internal, anyelement, text, integer, text, text)
 	RETURNS internal
 	AS 'MODULE_PATHNAME', 'pgis_asmvt_transfn'
 	LANGUAGE 'c' IMMUTABLE PARALLEL SAFE
@@ -4960,7 +4960,7 @@ CREATE AGGREGATE ST_AsMVT(anyelement, text)
 
 -- Availability: 2.4.0
 -- Changed: 3.2.0
-CREATE AGGREGATE ST_AsMVT(anyelement, text, int4)
+CREATE AGGREGATE ST_AsMVT(anyelement, text, integer)
 (
 	sfunc = pgis_asmvt_transfn,
 	stype = internal,
@@ -4976,7 +4976,7 @@ CREATE AGGREGATE ST_AsMVT(anyelement, text, int4)
 
 -- Availability: 2.4.0
 -- Changed: 3.2.0
-CREATE AGGREGATE ST_AsMVT(anyelement, text, int4, text)
+CREATE AGGREGATE ST_AsMVT(anyelement, text, integer, text)
 (
 	sfunc = pgis_asmvt_transfn,
 	stype = internal,
@@ -4992,7 +4992,7 @@ CREATE AGGREGATE ST_AsMVT(anyelement, text, int4, text)
 
 -- Availability: 3.0.0
 -- Changed: 3.2.0
-CREATE AGGREGATE ST_AsMVT(anyelement, text, int4, text, text)
+CREATE AGGREGATE ST_AsMVT(anyelement, text, integer, text, text)
 (
 	sfunc = pgis_asmvt_transfn,
 	stype = internal,
@@ -5007,7 +5007,7 @@ CREATE AGGREGATE ST_AsMVT(anyelement, text, int4, text, text)
 );
 
 -- Availability: 2.4.0
-CREATE OR REPLACE FUNCTION ST_AsMVTGeom(geom geometry, bounds box2d, extent int4 default 4096, buffer int4 default 256, clip_geom bool default true)
+CREATE OR REPLACE FUNCTION ST_AsMVTGeom(geom geometry, bounds box2d, extent integer default 4096, buffer integer default 256, clip_geom bool default true)
 	RETURNS geometry
 	AS 'MODULE_PATHNAME','ST_AsMVTGeom'
 	LANGUAGE 'c' IMMUTABLE PARALLEL SAFE
@@ -5154,7 +5154,7 @@ CREATE OR REPLACE FUNCTION ST_FromFlatGeobuf(anyelement, bytea)
 
 -- Availability 1.4.0
 -- Changed 2.0.0 to use default args and named args
-CREATE OR REPLACE FUNCTION ST_GeoHash(geom geometry, maxchars int4 DEFAULT 0)
+CREATE OR REPLACE FUNCTION ST_GeoHash(geom geometry, maxchars integer DEFAULT 0)
 	RETURNS TEXT
 	AS 'MODULE_PATHNAME', 'ST_GeoHash'
 	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
@@ -5172,22 +5172,22 @@ CREATE OR REPLACE FUNCTION _ST_SortableHash(geom geometry)
 -- GeoHash input
 -- Availability: 2.0.?
 -----------------------------------------------------------------------
--- ST_Box2dFromGeoHash(geohash text, precision int4)
-CREATE OR REPLACE FUNCTION ST_Box2dFromGeoHash(text, int4 DEFAULT NULL)
+-- ST_Box2dFromGeoHash(geohash text, precision integer)
+CREATE OR REPLACE FUNCTION ST_Box2dFromGeoHash(text, integer DEFAULT NULL)
 	RETURNS box2d
 	AS 'MODULE_PATHNAME','box2d_from_geohash'
 	LANGUAGE 'c' IMMUTABLE PARALLEL SAFE
 	_COST_LOW;
 
--- ST_PointFromGeoHash(geohash text, precision int4)
-CREATE OR REPLACE FUNCTION ST_PointFromGeoHash(text, int4 DEFAULT NULL)
+-- ST_PointFromGeoHash(geohash text, precision integer)
+CREATE OR REPLACE FUNCTION ST_PointFromGeoHash(text, integer DEFAULT NULL)
 	RETURNS geometry
 	AS 'MODULE_PATHNAME','point_from_geohash'
 	LANGUAGE 'c' IMMUTABLE PARALLEL SAFE
 	_COST_LOW;
 
--- ST_GeomFromGeoHash(geohash text, precision int4)
-CREATE OR REPLACE FUNCTION ST_GeomFromGeoHash(text, int4 DEFAULT NULL)
+-- ST_GeomFromGeoHash(geohash text, precision integer)
+CREATE OR REPLACE FUNCTION ST_GeomFromGeoHash(text, integer DEFAULT NULL)
 	RETURNS geometry
 	AS $$ SELECT CAST(@extschema at .ST_Box2dFromGeoHash($1, $2) AS geometry); $$
 	LANGUAGE 'sql' IMMUTABLE PARALLEL SAFE
@@ -5198,14 +5198,14 @@ CREATE OR REPLACE FUNCTION ST_GeomFromGeoHash(text, int4 DEFAULT NULL)
 ------------------------------------------------------------------------
 -- PostGIS equivalent function: NumPoints(geometry)
 CREATE OR REPLACE FUNCTION ST_NumPoints(geometry)
-	RETURNS int4
+	RETURNS integer
 	AS 'MODULE_PATHNAME', 'LWGEOM_numpoints_linestring'
 	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
 	_COST_LOW;
 
 -- PostGIS equivalent function: NumGeometries(geometry)
 CREATE OR REPLACE FUNCTION ST_NumGeometries(geometry)
-	RETURNS int4
+	RETURNS integer
 	AS 'MODULE_PATHNAME', 'LWGEOM_numgeometries_collection'
 	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
 	_COST_LOW;
@@ -5219,7 +5219,7 @@ CREATE OR REPLACE FUNCTION ST_GeometryN(geometry,integer)
 
 -- PostGIS equivalent function: Dimension(geometry)
 CREATE OR REPLACE FUNCTION ST_Dimension(geometry)
-	RETURNS int4
+	RETURNS integer
 	AS 'MODULE_PATHNAME', 'LWGEOM_dimension'
 	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
 	_COST_LOW;
@@ -5275,7 +5275,7 @@ CREATE OR REPLACE FUNCTION ST_PointN(geometry,integer)
 
 -- Availability: 2.0.0
 CREATE OR REPLACE FUNCTION ST_NumPatches(geometry)
-	RETURNS int4
+	RETURNS integer
 	AS '
 	SELECT CASE WHEN @extschema at .ST_GeometryType($1) = ''ST_PolyhedralSurface''
 	THEN @extschema at .ST_NumGeometries($1)
@@ -5345,8 +5345,8 @@ CREATE OR REPLACE FUNCTION ST_AsText(geometry)
 	_COST_MEDIUM;
 
 -- Availability: 2.5.0
--- PostGIS equivalent function: AsText(geometry, int4)
-CREATE OR REPLACE FUNCTION ST_AsText(geometry, int4)
+-- PostGIS equivalent function: AsText(geometry, integer)
+CREATE OR REPLACE FUNCTION ST_AsText(geometry, integer)
 	RETURNS TEXT
 	AS 'MODULE_PATHNAME','LWGEOM_asText'
 	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
@@ -5360,7 +5360,7 @@ CREATE OR REPLACE FUNCTION ST_GeometryFromText(text)
 	_COST_MEDIUM;
 
 -- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_GeometryFromText(text, int4)
+CREATE OR REPLACE FUNCTION ST_GeometryFromText(text, integer)
 	RETURNS geometry
 	AS 'MODULE_PATHNAME','LWGEOM_from_text'
 	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
@@ -5373,8 +5373,8 @@ CREATE OR REPLACE FUNCTION ST_GeomFromText(text)
 	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
 	_COST_MEDIUM;
 
--- PostGIS equivalent function: ST_GeometryFromText(text, int4)
-CREATE OR REPLACE FUNCTION ST_GeomFromText(text, int4)
+-- PostGIS equivalent function: ST_GeometryFromText(text, integer)
+CREATE OR REPLACE FUNCTION ST_GeomFromText(text, integer)
 	RETURNS geometry
 	AS 'MODULE_PATHNAME','LWGEOM_from_text'
 	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
@@ -5399,9 +5399,9 @@ CREATE OR REPLACE FUNCTION ST_PointFromText(text)
 	LANGUAGE 'sql' IMMUTABLE STRICT PARALLEL SAFE
 	_COST_MEDIUM;
 
--- PostGIS equivalent function: PointFromText(text, int4)
+-- PostGIS equivalent function: PointFromText(text, integer)
 -- TODO: improve this ... by not duplicating constructor time.
-CREATE OR REPLACE FUNCTION ST_PointFromText(text, int4)
+CREATE OR REPLACE FUNCTION ST_PointFromText(text, integer)
 	RETURNS geometry
 	AS '
 	SELECT CASE WHEN @extschema at .geometrytype(@extschema at .ST_GeomFromText($1, $2)) = ''POINT''
@@ -5422,8 +5422,8 @@ CREATE OR REPLACE FUNCTION ST_LineFromText(text)
 	LANGUAGE 'sql' IMMUTABLE STRICT PARALLEL SAFE
 	_COST_MEDIUM;
 
--- PostGIS equivalent function: LineFromText(text, int4)
-CREATE OR REPLACE FUNCTION ST_LineFromText(text, int4)
+-- PostGIS equivalent function: LineFromText(text, integer)
+CREATE OR REPLACE FUNCTION ST_LineFromText(text, integer)
 	RETURNS geometry
 	AS '
 	SELECT CASE WHEN @extschema at .geometrytype(@extschema at .ST_GeomFromText($1, $2)) = ''LINESTRING''
@@ -5444,8 +5444,8 @@ CREATE OR REPLACE FUNCTION ST_PolyFromText(text)
 	LANGUAGE 'sql' IMMUTABLE STRICT PARALLEL SAFE
 	_COST_MEDIUM;
 
--- PostGIS equivalent function: ST_PolygonFromText(text, int4)
-CREATE OR REPLACE FUNCTION ST_PolyFromText(text, int4)
+-- PostGIS equivalent function: ST_PolygonFromText(text, integer)
+CREATE OR REPLACE FUNCTION ST_PolyFromText(text, integer)
 	RETURNS geometry
 	AS '
 	SELECT CASE WHEN @extschema at .geometrytype(@extschema at .ST_GeomFromText($1, $2)) = ''POLYGON''
@@ -5456,7 +5456,7 @@ CREATE OR REPLACE FUNCTION ST_PolyFromText(text, int4)
 	_COST_MEDIUM;
 
 -- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_PolygonFromText(text, int4)
+CREATE OR REPLACE FUNCTION ST_PolygonFromText(text, integer)
 	RETURNS geometry
 	AS 'SELECT @extschema at .ST_PolyFromText($1, $2)'
 	LANGUAGE 'sql' IMMUTABLE STRICT PARALLEL SAFE
@@ -5469,8 +5469,8 @@ CREATE OR REPLACE FUNCTION ST_PolygonFromText(text)
 	LANGUAGE 'sql' IMMUTABLE STRICT PARALLEL SAFE
 	_COST_MEDIUM;
 
--- PostGIS equivalent function: MLineFromText(text, int4)
-CREATE OR REPLACE FUNCTION ST_MLineFromText(text, int4)
+-- PostGIS equivalent function: MLineFromText(text, integer)
+CREATE OR REPLACE FUNCTION ST_MLineFromText(text, integer)
 	RETURNS geometry
 	AS '
 	SELECT CASE
@@ -5500,14 +5500,14 @@ CREATE OR REPLACE FUNCTION ST_MultiLineStringFromText(text)
 	_COST_MEDIUM;
 
 -- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_MultiLineStringFromText(text, int4)
+CREATE OR REPLACE FUNCTION ST_MultiLineStringFromText(text, integer)
 	RETURNS geometry
 	AS 'SELECT @extschema at .ST_MLineFromText($1, $2)'
 	LANGUAGE 'sql' IMMUTABLE STRICT PARALLEL SAFE
 	_COST_MEDIUM;
 
--- PostGIS equivalent function: MPointFromText(text, int4)
-CREATE OR REPLACE FUNCTION ST_MPointFromText(text, int4)
+-- PostGIS equivalent function: MPointFromText(text, integer)
+CREATE OR REPLACE FUNCTION ST_MPointFromText(text, integer)
 	RETURNS geometry
 	AS '
 	SELECT CASE WHEN @extschema at .geometrytype(@extschema at .ST_GeomFromText($1, $2)) = ''MULTIPOINT''
@@ -5535,8 +5535,8 @@ CREATE OR REPLACE FUNCTION ST_MultiPointFromText(text)
 	LANGUAGE 'sql' IMMUTABLE STRICT PARALLEL SAFE
 	_COST_MEDIUM;
 
--- PostGIS equivalent function: MPolyFromText(text, int4)
-CREATE OR REPLACE FUNCTION ST_MPolyFromText(text, int4)
+-- PostGIS equivalent function: MPolyFromText(text, integer)
+CREATE OR REPLACE FUNCTION ST_MPolyFromText(text, integer)
 	RETURNS geometry
 	AS '
 	SELECT CASE WHEN @extschema at .geometrytype(@extschema at .ST_GeomFromText($1, $2)) = ''MULTIPOLYGON''
@@ -5558,7 +5558,7 @@ CREATE OR REPLACE FUNCTION ST_MPolyFromText(text)
 	_COST_MEDIUM;
 
 -- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_MultiPolygonFromText(text, int4)
+CREATE OR REPLACE FUNCTION ST_MultiPolygonFromText(text, integer)
 	RETURNS geometry
 	AS 'SELECT @extschema at .ST_MPolyFromText($1, $2)'
 	LANGUAGE 'sql' IMMUTABLE STRICT PARALLEL SAFE
@@ -5572,7 +5572,7 @@ CREATE OR REPLACE FUNCTION ST_MultiPolygonFromText(text)
 	_COST_MEDIUM;
 
 -- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_GeomCollFromText(text, int4)
+CREATE OR REPLACE FUNCTION ST_GeomCollFromText(text, integer)
 	RETURNS geometry
 	AS '
 	SELECT CASE
@@ -6691,7 +6691,7 @@ LANGUAGE 'plpgsql' IMMUTABLE STRICT PARALLEL SAFE _COST_HIGH;
 -- X3D OUTPUT
 -----------------------------------------------------------------------
 -- _ST_AsX3D(version, geom, precision, option, attribs)
-CREATE OR REPLACE FUNCTION _ST_AsX3D(int4, geometry, int4, int4, text)
+CREATE OR REPLACE FUNCTION _ST_AsX3D(integer, geometry, integer, integer, text)
 	RETURNS TEXT
 	AS 'MODULE_PATHNAME','LWGEOM_asX3D'
 	LANGUAGE 'c' IMMUTABLE PARALLEL SAFE
diff --git a/raster/rt_pg/rtpostgis.sql.in b/raster/rt_pg/rtpostgis.sql.in
index 76890bd85..6d1134ebc 100644
--- a/raster/rt_pg/rtpostgis.sql.in
+++ b/raster/rt_pg/rtpostgis.sql.in
@@ -327,14 +327,14 @@ CREATE OR REPLACE FUNCTION st_summary(rast raster)
 
 -- Availability: 2.2.0
 CREATE OR REPLACE FUNCTION ST_MemSize(raster)
-	RETURNS int4
+	RETURNS integer
 	AS 'MODULE_PATHNAME', 'RASTER_memsize'
 	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE;
 
 -----------------------------------------------------------------------
 -- Constructor ST_MakeEmptyRaster
 -----------------------------------------------------------------------
-CREATE OR REPLACE FUNCTION st_makeemptyraster(width int, height int, upperleftx float8, upperlefty float8, scalex float8, scaley float8, skewx float8, skewy float8, srid int4 DEFAULT 0)
+CREATE OR REPLACE FUNCTION st_makeemptyraster(width int, height int, upperleftx float8, upperlefty float8, scalex float8, scaley float8, skewx float8, skewy float8, srid integer DEFAULT 0)
     RETURNS RASTER
     AS 'MODULE_PATHNAME', 'RASTER_makeEmpty'
     LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE;
@@ -8758,7 +8758,7 @@ END;
 $$ LANGUAGE 'plpgsql' VOLATILE STRICT;
 
 -- Availability: 2.4.0
-CREATE OR REPLACE FUNCTION st_makeemptycoverage(tilewidth int, tileheight int, width int, height int, upperleftx float8, upperlefty float8, scalex float8, scaley float8, skewx float8, skewy float8, srid int4 DEFAULT 0)
+CREATE OR REPLACE FUNCTION st_makeemptycoverage(tilewidth int, tileheight int, width int, height int, upperleftx float8, upperlefty float8, scalex float8, scaley float8, skewx float8, skewy float8, srid integer DEFAULT 0)
     RETURNS SETOF RASTER AS $$
     DECLARE
         ulx double precision;  -- upper left x of raster
diff --git a/raster/rt_pg/rtpostgis_drop.sql.in b/raster/rt_pg/rtpostgis_drop.sql.in
index cde5bdddf..be63498a3 100644
--- a/raster/rt_pg/rtpostgis_drop.sql.in
+++ b/raster/rt_pg/rtpostgis_drop.sql.in
@@ -60,13 +60,13 @@ DROP FUNCTION IF EXISTS ST_Intersection(geometry,raster);
 -- Removed in 2.1.0
 DROP FUNCTION IF EXISTS _st_mapalgebra4unionfinal1(raster);
 -- Removed in 2.1.0
-DROP FUNCTION IF EXISTS _st_mapalgebra4unionstate(raster, raster, int4);
+DROP FUNCTION IF EXISTS _st_mapalgebra4unionstate(raster, raster, integer);
 -- Removed in 2.1.0
 DROP FUNCTION IF EXISTS _st_mapalgebra4unionstate(raster, raster);
 -- Removed in 2.1.0
 DROP FUNCTION IF EXISTS _st_mapalgebra4unionstate(raster, raster, text);
 -- Removed in 2.1.0
-DROP FUNCTION IF EXISTS _st_mapalgebra4unionstate(raster, raster, int4, text);
+DROP FUNCTION IF EXISTS _st_mapalgebra4unionstate(raster, raster, integer, text);
 -- Removed in 2.1.0
 DROP FUNCTION IF EXISTS _st_mapalgebra4unionstate(raster, raster, text, text, text, float8, text, text, text, float8);
 -- Removed in 2.2.0
diff --git a/raster/rt_pg/rtpostgis_upgrade_cleanup.sql.in b/raster/rt_pg/rtpostgis_upgrade_cleanup.sql.in
index 0d6f3ba00..8e2ffe795 100644
--- a/raster/rt_pg/rtpostgis_upgrade_cleanup.sql.in
+++ b/raster/rt_pg/rtpostgis_upgrade_cleanup.sql.in
@@ -216,7 +216,7 @@ DROP FUNCTION IF EXISTS st_polygon(raster, integer);
 -- function no longer exists
 DROP FUNCTION IF EXISTS st_makeemptyraster(int, int, float8, float8, float8, float8, float8, float8);
 -- signature changed
-DROP FUNCTION IF EXISTS st_makeemptyraster(int, int, float8, float8, float8, float8, float8, float8, int4);
+DROP FUNCTION IF EXISTS st_makeemptyraster(int, int, float8, float8, float8, float8, float8, float8, integer);
 
 -- function no longer exists
 DROP FUNCTION IF EXISTS st_addband(raster, text);
diff --git a/sfcgal/sfcgal.sql.in b/sfcgal/sfcgal.sql.in
index 5d8a629f3..dab2d8246 100644
--- a/sfcgal/sfcgal.sql.in
+++ b/sfcgal/sfcgal.sql.in
@@ -85,7 +85,7 @@ CREATE OR REPLACE FUNCTION ST_ForceLHR(geometry)
 
 -- Availability: 2.1.0
 CREATE OR REPLACE FUNCTION ST_Orientation(geometry)
-       RETURNS INT4
+       RETURNS integer
        AS 'MODULE_PATHNAME','sfcgal_orientation'
        LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
        COST 100;
diff --git a/topology/sql/manage/CopyTopology.sql.in b/topology/sql/manage/CopyTopology.sql.in
index 700af6c38..2153a572c 100644
--- a/topology/sql/manage/CopyTopology.sql.in
+++ b/topology/sql/manage/CopyTopology.sql.in
@@ -25,7 +25,7 @@ DECLARE
   rec2 RECORD;
   oldtopo_id integer;
   newtopo_id integer;
-  n int4;
+  n integer;
   ret text;
 BEGIN
 
diff --git a/topology/sql/manage/TopologySummary.sql.in b/topology/sql/manage/TopologySummary.sql.in
index 8bc5b1f37..b2bd1a44c 100644
--- a/topology/sql/manage/TopologySummary.sql.in
+++ b/topology/sql/manage/TopologySummary.sql.in
@@ -23,11 +23,11 @@ DECLARE
   rec RECORD;
   rec2 RECORD;
   var_topology_id integer;
-  n int4;
-  missing int4;
+  n integer;
+  missing integer;
   sql text;
   ret text;
-  tgcount int4;
+  tgcount integer;
 BEGIN
 
   ret := 'Topology ' || quote_ident(atopology) ;

-----------------------------------------------------------------------

Summary of changes:
 NEWS                                          |   4 +
 libpgcommon/lwgeom_cache.c                    |   2 +-
 postgis/geography.sql.in                      |  30 ++---
 postgis/legacy.sql.in                         |  60 +++++-----
 postgis/legacy_gist.sql.in                    |   4 +-
 postgis/legacy_minimal.sql.in                 |   6 +-
 postgis/postgis.sql.in                        | 162 +++++++++++++-------------
 raster/rt_pg/rtpostgis.sql.in                 |   6 +-
 raster/rt_pg/rtpostgis_drop.sql.in            |   4 +-
 raster/rt_pg/rtpostgis_upgrade_cleanup.sql.in |   2 +-
 regress/core/tickets.sql                      |  26 +++++
 regress/core/tickets_expected                 |   2 +
 sfcgal/sfcgal.sql.in                          |   2 +-
 topology/sql/manage/CopyTopology.sql.in       |   2 +-
 topology/sql/manage/TopologySummary.sql.in    |   6 +-
 15 files changed, 175 insertions(+), 143 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list