[postgis-devel] [PostGIS] #666: ST_DumpPoints is not null safe

PostGIS trac at osgeo.org
Fri Jun 10 10:08:52 PDT 2011


#666: ST_DumpPoints is not null safe
----------------------+-----------------------------------------------------
  Reporter:  robe     |       Owner:  pramsey      
      Type:  defect   |      Status:  closed       
  Priority:  medium   |   Milestone:  PostGIS 1.5.3
 Component:  postgis  |     Version:  1.5.X        
Resolution:  fixed    |    Keywords:  history      
----------------------+-----------------------------------------------------
Changes (by robe):

  * keywords:  => history
  * status:  new => closed
  * resolution:  => fixed


Old description:

> {{{
> SELECT ST_DumpPoints(foo1.the_geom)
>         FROM ((SELECT CAST(Null As geometry) As the_geom)) As foo1;
> }}}
>

> Gives error -
>
> {{{
> ERROR:  Unexpected error while dumping geometry <NULL>
> CONTEXT:  SQL function "st_dumppoints" statement 1
> }}}

New description:

 {{{
 SELECT ST_DumpPoints(foo1.the_geom)
         FROM ((SELECT CAST(Null As geometry) As the_geom)) As foo1;
 }}}


 Gives error -

 {{{
 ERROR:  Unexpected error while dumping geometry <NULL>
 CONTEXT:  SQL function "st_dumppoints" statement 1
 }}}

--

Comment:

 Fixed at r7360 for 1.5 and r7361 for PostGIS 2.0.0.  Note the
 _ST_DumpPoints still has an issue thought no one would be calling that
 directly.  Can't make that strict since it should have nulls passed in.
 For a more permanent solution - we might want to just go with yabo's
 suggestion.

 With my fix, dumping a NULL will return no records which is hmm okay with
 me.

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