[postgis-devel] [PostGIS] #2049: populate_geometry_columns: ERROR: cannot alter type of a column used in a trigger definition

PostGIS trac at osgeo.org
Tue Oct 16 07:58:32 PDT 2012


#2049: populate_geometry_columns: ERROR:  cannot alter type of a column used in a
trigger definition
---------------------+------------------------------------------------------
 Reporter:  strk     |       Owner:  pramsey      
     Type:  defect   |      Status:  new          
 Priority:  medium   |   Milestone:  PostGIS 2.0.2
Component:  postgis  |     Version:  2.0.x        
 Keywords:           |  
---------------------+------------------------------------------------------
 This is the situation: I've a table with a column of type "geometry" which
 is used in a trigger. There is no constraint on the type of the geometry,
 but all rows are of type POINT and srid 4326.

 I think in normal situation populate_geometry_column() would alter the
 table to become of type "geometry(point, 4326)" but in this case it would
 fail with this message:

 {{{
 ERROR:  cannot alter type of a column used in a trigger definition
 }}}

 I think it should be fixed in 2.0 by disabling the trigger during the
 ALTER as we know we're not really altering the value of the geometry but
 only it's _advertised_ type, right ?

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2049>
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