[postgis-devel] [PostGIS] #1320: typmod geometry type not changing in before trigger

PostGIS trac at osgeo.org
Thu Dec 15 14:56:04 PST 2011


#1320: typmod geometry type not changing in before trigger
----------------------+-----------------------------------------------------
 Reporter:  robe      |       Owner:  jomarlla@…         
     Type:  defect    |      Status:  new                
 Priority:  critical  |   Milestone:  PostGIS 2.0.0      
Component:  postgis   |     Version:  trunk              
 Keywords:            |  
----------------------+-----------------------------------------------------

Comment(by strk):

 It looks like the big difference here is the use of a cast.
 See debugging lines. Here's the geometry case:

 {{{
 NOTICE:  [gserialized_typmod.c:postgis_valid_typmod:124] Entered function
 NOTICE:  [gserialized_typmod.c:postgis_valid_typmod:129] Got lwgeom(type =
 6, srid = 4326, hasz = 0, hasm = 0)
 NOTICE:  [gserialized_typmod.c:postgis_valid_typmod:130] Got typmod(type =
 6, srid = 4326, hasz = 0, hasm = 0)
 }}}

 Here's the geography case:

 {{{
 OTICE:  [gserialized_typmod.c:postgis_valid_typmod:124] Entered function
 NOTICE:  [gserialized_typmod.c:postgis_valid_typmod:129] Got lwgeom(type =
 6, srid = 4326, hasz = 0, hasm = 0)
 NOTICE:  [gserialized_typmod.c:postgis_valid_typmod:130] Got typmod(type =
 6, srid = 4326, hasz = 0, hasm = 0)
 NOTICE:  [gserialized_typmod.c:postgis_valid_typmod:124] Entered function
 NOTICE:  [gserialized_typmod.c:postgis_valid_typmod:129] Got lwgeom(type =
 3, srid = 4326, hasz = 0, hasm = 0)
 NOTICE:  [gserialized_typmod.c:postgis_valid_typmod:130] Got typmod(type =
 6, srid = 4326, hasz = 0, hasm = 0)
 }}}

 So the first part is the same for both (no mismatch) while for geography
 there's a second step going on in which lwgeom becomes visibly different
 from expected typmod.

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