[postgis-devel] [PostGIS] #449: Populate_Geometry_Columns should declare type to be 'GEOMETRY' when failing to apply geotype constraint

PostGIS trac at osgeo.org
Wed Feb 24 10:30:46 PST 2010


#449: Populate_Geometry_Columns should declare type to be 'GEOMETRY' when failing
to apply geotype constraint
----------------------+-----------------------------------------------------
 Reporter:  kneufeld  |       Owner:  pramsey      
     Type:  defect    |      Status:  new          
 Priority:  medium    |   Milestone:  PostGIS 1.5.1
Component:  postgis   |     Version:  1.5.X        
 Keywords:            |  
----------------------+-----------------------------------------------------
 A table with mixed geometry types obviously can't have an enforce_geotype
 constraint applied to the table, but geometry_columns should still have a
 valid record indicating the geometry type.  In this case, perhaps
 'GEOMETRY' or 'MIXED'.

 At the moment, this function declares the type in geometry_columns to be
 the first geometrytype detected in the table, which is not correct.


 {{{
 create table foo(geom geometry);
 insert into foo values ('POINT(0 0)'::geometry);
 insert into foo values ('LINESTRING(0 0, 1 1)'::geometry);
 select populate_geometry_columns();
 select * from geometry_columns ;

  f_table_catalog | f_table_schema | f_table_name | f_geometry_column |
 coord_dimension | srid | type
 -----------------+----------------+--------------+-------------------+-----------------+------+-------
                  | public         | foo          | geom              |
 2 |   -1 | POINT
 (1 row)
 }}}

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/449>
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-devel mailing list