[postgis-tickets] r17368 - Fix postgis_type_name with (GEOMETRYM, 3)
Raul
raul at rmr.ninja
Fri Mar 29 07:29:21 PDT 2019
Author: algunenano
Date: 2019-03-29 07:29:21 -0700 (Fri, 29 Mar 2019)
New Revision: 17368
Modified:
branches/2.4/NEWS
branches/2.4/postgis/postgis.sql.in
branches/2.4/regress/postgis_type_name.sql
branches/2.4/regress/postgis_type_name_expected
Log:
Fix postgis_type_name with (GEOMETRYM,3)
Patch by Matt Bretl
References #4361
Modified: branches/2.4/NEWS
===================================================================
--- branches/2.4/NEWS 2019-03-29 14:27:56 UTC (rev 17367)
+++ branches/2.4/NEWS 2019-03-29 14:29:21 UTC (rev 17368)
@@ -1,3 +1,10 @@
+PostGIS 2.4.8
+2019/XX/XX
+
+ * Bug Fixes and Enhancements *
+
+ - #4361, Fix postgis_type_name with (GEOMETRYM,3) (Matt Bretl)
+
PostGIS 2.4.7
2019/03/11
Modified: branches/2.4/postgis/postgis.sql.in
===================================================================
--- branches/2.4/postgis/postgis.sql.in 2019-03-29 14:27:56 UTC (rev 17367)
+++ branches/2.4/postgis/postgis.sql.in 2019-03-29 14:29:21 UTC (rev 17368)
@@ -5316,89 +5316,91 @@
RETURNS varchar
AS
$$
- SELECT CASE WHEN $3 THEN new_name ELSE old_name END As geomname
+ SELECT CASE WHEN $3 THEN new_name ELSE old_name END As geomname
FROM
- ( VALUES
- ('GEOMETRY', 'Geometry', 2) ,
- ('GEOMETRY', 'GeometryZ', 3) ,
- ('GEOMETRY', 'GeometryZM', 4) ,
- ('GEOMETRYCOLLECTION', 'GeometryCollection', 2) ,
- ('GEOMETRYCOLLECTION', 'GeometryCollectionZ', 3) ,
- ('GEOMETRYCOLLECTIONM', 'GeometryCollectionM', 3) ,
- ('GEOMETRYCOLLECTION', 'GeometryCollectionZM', 4) ,
+ ( VALUES
+ ('GEOMETRY', 'Geometry', 2),
+ ('GEOMETRY', 'GeometryZ', 3),
+ ('GEOMETRYM', 'GeometryM', 3),
+ ('GEOMETRY', 'GeometryZM', 4),
- ('POINT', 'Point',2) ,
- ('POINTM','PointM',3) ,
- ('POINT', 'PointZ',3) ,
- ('POINT', 'PointZM',4) ,
+ ('GEOMETRYCOLLECTION', 'GeometryCollection', 2),
+ ('GEOMETRYCOLLECTION', 'GeometryCollectionZ', 3),
+ ('GEOMETRYCOLLECTIONM', 'GeometryCollectionM', 3),
+ ('GEOMETRYCOLLECTION', 'GeometryCollectionZM', 4),
- ('MULTIPOINT','MultiPoint',2) ,
- ('MULTIPOINT','MultiPointZ',3) ,
- ('MULTIPOINTM','MultiPointM',3) ,
- ('MULTIPOINT','MultiPointZM',4) ,
+ ('POINT', 'Point', 2),
+ ('POINT', 'PointZ', 3),
+ ('POINTM','PointM', 3),
+ ('POINT', 'PointZM', 4),
- ('POLYGON', 'Polygon',2) ,
- ('POLYGON', 'PolygonZ',3) ,
- ('POLYGONM', 'PolygonM',3) ,
- ('POLYGON', 'PolygonZM',4) ,
+ ('MULTIPOINT','MultiPoint', 2),
+ ('MULTIPOINT','MultiPointZ', 3),
+ ('MULTIPOINTM','MultiPointM', 3),
+ ('MULTIPOINT','MultiPointZM', 4),
- ('MULTIPOLYGON', 'MultiPolygon',2) ,
- ('MULTIPOLYGON', 'MultiPolygonZ',3) ,
- ('MULTIPOLYGONM', 'MultiPolygonM',3) ,
- ('MULTIPOLYGON', 'MultiPolygonZM',4) ,
+ ('POLYGON', 'Polygon', 2),
+ ('POLYGON', 'PolygonZ', 3),
+ ('POLYGONM', 'PolygonM', 3),
+ ('POLYGON', 'PolygonZM', 4),
- ('MULTILINESTRING', 'MultiLineString',2) ,
- ('MULTILINESTRING', 'MultiLineStringZ',3) ,
- ('MULTILINESTRINGM', 'MultiLineStringM',3) ,
- ('MULTILINESTRING', 'MultiLineStringZM',4) ,
+ ('MULTIPOLYGON', 'MultiPolygon', 2),
+ ('MULTIPOLYGON', 'MultiPolygonZ', 3),
+ ('MULTIPOLYGONM', 'MultiPolygonM', 3),
+ ('MULTIPOLYGON', 'MultiPolygonZM', 4),
- ('LINESTRING', 'LineString',2) ,
- ('LINESTRING', 'LineStringZ',3) ,
- ('LINESTRINGM', 'LineStringM',3) ,
- ('LINESTRING', 'LineStringZM',4) ,
+ ('MULTILINESTRING', 'MultiLineString', 2),
+ ('MULTILINESTRING', 'MultiLineStringZ', 3),
+ ('MULTILINESTRINGM', 'MultiLineStringM', 3),
+ ('MULTILINESTRING', 'MultiLineStringZM', 4),
- ('CIRCULARSTRING', 'CircularString',2) ,
- ('CIRCULARSTRING', 'CircularStringZ',3) ,
- ('CIRCULARSTRINGM', 'CircularStringM',3) ,
- ('CIRCULARSTRING', 'CircularStringZM',4) ,
+ ('LINESTRING', 'LineString', 2),
+ ('LINESTRING', 'LineStringZ', 3),
+ ('LINESTRINGM', 'LineStringM', 3),
+ ('LINESTRING', 'LineStringZM', 4),
- ('COMPOUNDCURVE', 'CompoundCurve',2) ,
- ('COMPOUNDCURVE', 'CompoundCurveZ',3) ,
- ('COMPOUNDCURVEM', 'CompoundCurveM',3) ,
- ('COMPOUNDCURVE', 'CompoundCurveZM',4) ,
+ ('CIRCULARSTRING', 'CircularString', 2),
+ ('CIRCULARSTRING', 'CircularStringZ', 3),
+ ('CIRCULARSTRINGM', 'CircularStringM' ,3),
+ ('CIRCULARSTRING', 'CircularStringZM', 4),
- ('CURVEPOLYGON', 'CurvePolygon',2) ,
- ('CURVEPOLYGON', 'CurvePolygonZ',3) ,
- ('CURVEPOLYGONM', 'CurvePolygonM',3) ,
- ('CURVEPOLYGON', 'CurvePolygonZM',4) ,
+ ('COMPOUNDCURVE', 'CompoundCurve', 2),
+ ('COMPOUNDCURVE', 'CompoundCurveZ', 3),
+ ('COMPOUNDCURVEM', 'CompoundCurveM', 3),
+ ('COMPOUNDCURVE', 'CompoundCurveZM', 4),
- ('MULTICURVE', 'MultiCurve',2 ) ,
- ('MULTICURVE', 'MultiCurveZ',3 ) ,
- ('MULTICURVEM', 'MultiCurveM',3 ) ,
- ('MULTICURVE', 'MultiCurveZM',4 ) ,
+ ('CURVEPOLYGON', 'CurvePolygon', 2),
+ ('CURVEPOLYGON', 'CurvePolygonZ', 3),
+ ('CURVEPOLYGONM', 'CurvePolygonM', 3),
+ ('CURVEPOLYGON', 'CurvePolygonZM', 4),
- ('MULTISURFACE', 'MultiSurface', 2) ,
- ('MULTISURFACE', 'MultiSurfaceZ', 3) ,
- ('MULTISURFACEM', 'MultiSurfaceM', 3) ,
- ('MULTISURFACE', 'MultiSurfaceZM', 4) ,
+ ('MULTICURVE', 'MultiCurve', 2),
+ ('MULTICURVE', 'MultiCurveZ', 3),
+ ('MULTICURVEM', 'MultiCurveM', 3),
+ ('MULTICURVE', 'MultiCurveZM', 4),
- ('POLYHEDRALSURFACE', 'PolyhedralSurface',2) ,
- ('POLYHEDRALSURFACE', 'PolyhedralSurfaceZ',3) ,
- ('POLYHEDRALSURFACEM', 'PolyhedralSurfaceM',3) ,
- ('POLYHEDRALSURFACE', 'PolyhedralSurfaceZM',4) ,
+ ('MULTISURFACE', 'MultiSurface', 2),
+ ('MULTISURFACE', 'MultiSurfaceZ', 3),
+ ('MULTISURFACEM', 'MultiSurfaceM', 3),
+ ('MULTISURFACE', 'MultiSurfaceZM', 4),
- ('TRIANGLE', 'Triangle',2) ,
- ('TRIANGLE', 'TriangleZ',3) ,
- ('TRIANGLEM', 'TriangleM',3) ,
- ('TRIANGLE', 'TriangleZM',4) ,
+ ('POLYHEDRALSURFACE', 'PolyhedralSurface', 2),
+ ('POLYHEDRALSURFACE', 'PolyhedralSurfaceZ', 3),
+ ('POLYHEDRALSURFACEM', 'PolyhedralSurfaceM', 3),
+ ('POLYHEDRALSURFACE', 'PolyhedralSurfaceZM', 4),
+ ('TRIANGLE', 'Triangle', 2),
+ ('TRIANGLE', 'TriangleZ', 3),
+ ('TRIANGLEM', 'TriangleM', 3),
+ ('TRIANGLE', 'TriangleZM', 4),
+
('TIN', 'Tin', 2),
('TIN', 'TinZ', 3),
- ('TIN', 'TinM', 3),
+ ('TINM', 'TinM', 3),
('TIN', 'TinZM', 4) )
As g(old_name, new_name, coord_dimension)
- WHERE (upper(old_name) = upper($1) OR upper(new_name) = upper($1))
- AND coord_dimension = $2;
+ WHERE (upper(old_name) = upper($1) OR upper(new_name) = upper($1))
+ AND coord_dimension = $2;
$$
LANGUAGE 'sql' IMMUTABLE STRICT _PARALLEL COST 200;
Modified: branches/2.4/regress/postgis_type_name.sql
===================================================================
--- branches/2.4/regress/postgis_type_name.sql 2019-03-29 14:27:56 UTC (rev 17367)
+++ branches/2.4/regress/postgis_type_name.sql 2019-03-29 14:29:21 UTC (rev 17368)
@@ -1,3 +1,15 @@
+SELECT 'GEOMETRY(0)', postgis_type_name('GEOMETRY', 0);
+SELECT 'GEOMETRY(1)', postgis_type_name('GEOMETRY', 1);
+SELECT 'GEOMETRY(2)', postgis_type_name('GEOMETRY', 2);
+SELECT 'GEOMETRY(3)', postgis_type_name('GEOMETRY', 3);
+SELECT 'GEOMETRY(4)', postgis_type_name('GEOMETRY', 4);
+SELECT 'GEOMETRY(5)', postgis_type_name('GEOMETRY', 5);
+SELECT 'GEOMETRYM(2)', postgis_type_name('GEOMETRYM', 2);
+SELECT 'GEOMETRYM(3)', postgis_type_name('GEOMETRYM', 3);
+SELECT 'GEOMETRYZ(3)', postgis_type_name('GEOMETRYZ', 3);
+SELECT 'GEOMETRYZM(3)', postgis_type_name('GEOMETRYZM', 3);
+SELECT 'GEOMETRYZM(4)', postgis_type_name('GEOMETRYZM', 4);
+
SELECT 'POINT(0)', postgis_type_name('POINT', 0);
SELECT 'POINT(1)', postgis_type_name('POINT', 1);
SELECT 'POINT(2)', postgis_type_name('POINT', 2);
Modified: branches/2.4/regress/postgis_type_name_expected
===================================================================
--- branches/2.4/regress/postgis_type_name_expected 2019-03-29 14:27:56 UTC (rev 17367)
+++ branches/2.4/regress/postgis_type_name_expected 2019-03-29 14:29:21 UTC (rev 17368)
@@ -1,3 +1,14 @@
+GEOMETRY(0)|
+GEOMETRY(1)|
+GEOMETRY(2)|Geometry
+GEOMETRY(3)|GeometryZ
+GEOMETRY(4)|GeometryZM
+GEOMETRY(5)|
+GEOMETRYM(2)|
+GEOMETRYM(3)|GeometryM
+GEOMETRYZ(3)|GeometryZ
+GEOMETRYZM(3)|
+GEOMETRYZM(4)|GeometryZM
POINT(0)|
POINT(1)|
POINT(2)|Point
More information about the postgis-tickets
mailing list