Difference in behavior of AddGeometryColumn change in behavior between 3.5.2 and 3.5.3? SRID is listed as unknown when querying Geometry_Columns instead of the specified SRID
Michael Downey
mdowney at esri.com
Mon Aug 25 10:11:22 PDT 2025
Windows 17.6, 16.10,
PostGIS 3.5.3
For some reason I did not see this when I started testing 3.5.3 a couple of months ago. After I removed the earlier 3.5.2 and reinstalled 3.5.3, saw the query return an unknonw SRID instead of the stated one.
DROP TABLE map.t1;
CREATE TABLE map.t1 (
OBJECTID SERIAL NOT NULL,
PKEY INTEGER,
PRIMARY KEY ( OBJECTID ) );
SELECT public.AddGeometryColumn ('map', 't1', 'shape', 4326, upper('POINT'), 2, false);
addgeometrycolumn
-------------------------------------------
map.t1.shape SRID:4326 TYPE:POINT DIMS:2
SELECT f_table_schema AS schema, f_table_name AS table, f_geometry_column AS column, coord_dimension AS Dimension, srid FROM public.geometry_columns;
PostGIS 3.5.2
schema | table | column | dimension | srid
--------+------------------------+--------+-----------+------
map | t1 | shape | 2 | 4326
PostGIS 3.5.3
schema | table | column | dimension | srid
--------+------------------------+--------+-----------+------
map | t1 | shape | 2 | 0
But describe table looks fine:
\d t1
Table "map.t1"
Column | Type | Collation | Nullable | Default
----------+----------+-----------+----------+--------------------------------------
objectid | integer | | not null | nextval('t1_objectid_seq'::regclass)
pkey | integer | | |
shape | geometry | | |
Indexes:
"t1_pkey" PRIMARY KEY, btree (objectid)
Check constraints:
"enforce_dims_shape" CHECK (st_ndims(shape) = 2)
"enforce_geotype_shape" CHECK (geometrytype(shape) = 'POINT'::text OR shape IS NULL)
"enforce_srid_shape" CHECK (st_srid(shape) = 4326)
Thanks,
Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20250825/2a214dd9/attachment.htm>
More information about the postgis-users
mailing list