[postgis-tickets] [PostGIS] #2708: updategeometrysrid doesn't update srid check in some cases

PostGIS trac at osgeo.org
Wed Aug 20 04:33:24 PDT 2014


#2708: updategeometrysrid doesn't update srid check in some cases
------------------------+---------------------------------------------------
 Reporter:  igorberman  |       Owner:  robe         
     Type:  defect      |      Status:  new          
 Priority:  medium      |   Milestone:  PostGIS 2.1.4
Component:  postgis     |     Version:  2.1.x        
 Keywords:              |  
------------------------+---------------------------------------------------

Comment(by marcjansen):

 Hi everybody,

 I took a stab at this: https://github.com/postgis/postgis/pull/26

 I think the original bug is a result of using '''`schema_name`''' (the raw
 passed argument) instead of the verified variable '''`real_schema`'''.

 This is the diff

 {{{
 diff --git a/postgis/postgis.sql.in b/postgis/postgis.sql.in
 index 3b8b40b..835f629 100644
 --- a/postgis/postgis.sql.in
 +++ b/postgis/postgis.sql.in
 @@ -2389,7 +2389,7 @@ BEGIN
                 END IF;
         END IF;

 -       IF postgis_constraint_srid(schema_name, table_name, column_name)
 IS NOT NULL THEN
 +       IF postgis_constraint_srid(real_schema, table_name, column_name)
 IS NOT NULL THEN
         -- srid was enforced with constraints before, keep it that way.
          -- Make up constraint name
          cname = 'enforce_srid_'  || column_name;

 }}}

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2708#comment:2>
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