[postgis-devel] [PostGIS] #179: ST_MakeLine and ST_MakeLine_Garry crash server with null arrays

PostGIS trac at osgeo.org
Sun Sep 13 08:13:15 PDT 2009

#179: ST_MakeLine and ST_MakeLine_Garry crash server with null arrays
  Reporter:  robe     |       Owner:  pramsey      
      Type:  defect   |      Status:  reopened     
  Priority:  medium   |   Milestone:  postgis 1.3.7
 Component:  postgis  |     Version:  1.3.X        
Resolution:           |    Keywords:               
Comment (by robe):

 Yes we can have links.  Actually I think there may be a simpler solution
 to all of this.  Why can't we mark the aggregates as STRICT.  Not sure if
 that is backward compatible or not, but I have a feeling that is how this
 problem started when postgreSQL version started allowing nulls in
 aggregates -- but I see they have a STRICT option which I believe works
 for 8.3 and 8.4 (8.2 and 8.1 I suspect are non-issues since I don't think
 the NULLs were ever allowed).

 See this note extracted from PostgreSQL 8.4 create agg.

 "If the state transition function is declared "strict", then it cannot be
 called with null inputs. With such a transition function, aggregate
 execution behaves as follows. Rows with any null input values are ignored
 (the function is not called and the previous state value is retained). If
 the initial state value is null, then at the first row with all-nonnull
 input values, the first argument value replaces the state value, and the
 transition function is invoked at subsequent rows with all-nonnull input
 values. This is handy for implementing aggregates like max. Note that this
 behavior is only available when state_data_type is the same as the first
 input_data_type. When these types are different, you must supply a nonnull
 initial condition or use a nonstrict transition function. "


 I would like to see this fixed in 1.3.  Unfortuantely because of the new
 box3d_extent thing in 1.4, some of my apps break if I just convert over to
 1.4 so I can't without retesting and some recoding.  Which I am a bit in
 the process of doing.

Ticket URL: <http://trac.osgeo.org/postgis/ticket/179#comment:15>
PostGIS <http://trac.osgeo.org/postgis/>

More information about the postgis-devel mailing list