[PostGIS] #5978: geometry_columns not showing right SRID and Type for constraint based geometry columns

PostGIS trac at osgeo.org
Fri Sep 5 12:24:14 PDT 2025


#5978: geometry_columns not showing right SRID and Type for constraint based
geometry columns
----------------------+---------------------------
  Reporter:  robe     |      Owner:  pramsey
      Type:  defect   |     Status:  new
  Priority:  high     |  Milestone:  PostGIS 3.5.4
 Component:  postgis  |    Version:  3.5.x
Resolution:           |   Keywords:
----------------------+---------------------------
Description changed by pramsey:

Old description:

> As noted in mailing list https://lists.osgeo.org/pipermail/postgis-
> users/2025-August/046843.html
>
> The change in #4829 apparently broke constraint support at least for srid
> and type.
>
> Example to replicate:
>

> {{{
> CREATE SCHEMA IF NOT EXISTS map;
> CREATE TABLE map.t1 (
>   OBJECTID SERIAL NOT NULL,
>   PKEY     INTEGER,
>   PRIMARY KEY ( OBJECTID )  );
>
> SELECT public.AddGeometryColumn ('map', 't1', 'shape',  4326,
> upper('POINT'), 2, false);
>
> SELECT * FROM public.geometry_columns WHERE f_table_name = 't1';
> }}}
>

> outputs:
>

> {{{
>   f_table_catalog  | f_table_schema | f_table_name | f_geometry_column |
> coord_dimension | srid |   type
> -------------------+----------------+--------------+-------------------+-----------------+------+----------
>  postgis_35_sample | map            | t1           | shape             |
> 2 |    0 | GEOMETRY
> }}}
>

> Only tested on windows, haven't confirmed it's an issue on other OS.

New description:

 As noted in mailing list https://lists.osgeo.org/pipermail/postgis-
 users/2025-August/046843.html

 The change in #5829 apparently broke constraint support at least for srid
 and type.

 Example to replicate:


 {{{
 CREATE SCHEMA IF NOT EXISTS map;
 CREATE TABLE map.t1 (
   OBJECTID SERIAL NOT NULL,
   PKEY     INTEGER,
   PRIMARY KEY ( OBJECTID )  );

 SELECT public.AddGeometryColumn ('map', 't1', 'shape',  4326,
 upper('POINT'), 2, false);

 SELECT * FROM public.geometry_columns WHERE f_table_name = 't1';
 }}}


 outputs:


 {{{
   f_table_catalog  | f_table_schema | f_table_name | f_geometry_column |
 coord_dimension | srid |   type
 -------------------+----------------+--------------+-------------------+-----------------+------+----------
  postgis_35_sample | map            | t1           | shape             |
 2 |    0 | GEOMETRY
 }}}


 Only tested on windows, haven't confirmed it's an issue on other OS.

--
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5978#comment:1>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list