[postgis-tickets] [PostGIS] #2261: pagc Crashers

PostGIS trac at osgeo.org
Wed Apr 3 05:41:12 PDT 2013


#2261: pagc Crashers
------------------------------------+---------------------------------------
 Reporter:  robe                    |       Owner:  robe         
     Type:  defect                  |      Status:  new          
 Priority:  critical                |   Milestone:  PostGIS 2.1.0
Component:  pagc_address_parser     |     Version:  trunk        
 Keywords:  pagc_normalize_address  |  
------------------------------------+---------------------------------------
 Found some addresses that crash the pagc normalizer (well at least on
 windows anyway both my 32-bit and 64-bit).


 {{{
 SELECT pagc_normalize_address('25 Wizard of Oz, Walaford, KS 99912323')
 }}}

 output is this before it kicks the bucket:

 {{{
 NOTICE:  Start standardize_address
 CONTEXT:  SQL statement "SELECT (SELECT standardize_address( 'select seq,
 word::text, stdword::text, token from tiger.pagc_gaz union all select seq,
 word::text, stdword::text, token from tiger.pagc_lex '
        , 'select seq, word::text, stdword::text, token from tiger.pagc_gaz
 order by id'
        , 'select * from tiger.pagc_rules order by id'
 , 'select 0::int4 as id, ' || quote_literal(address1) || '::text As micro,
    ' || quote_literal(city || ', ' || state || ' ' || zip) || '::text As
 macro') As pagc_addr
  FROM  (SELECT * FROM parse_address(rawInput) ) As a )"
 PL/pgSQL function pagc_normalize_address(character varying) line 13 at
 assignment
 NOTICE:  start load_lex
 }}}

 I notice the first step parse_address returns no zip, so think this is
 something I need to fix in the pagc_normalize_address function to have it
 never send NULL to the function and coalesce things that return empty


 {{{
 SELECT * FROM parse_address('25 Wizard of Oz, Walaford, KS 99912323')

 25;Wizard of Oz, Walaford;;25 Wizard of Oz, Walaford;KS 99912323;;;;US
 }}}

 We should probably put a null exception into pagc if you don't have it
 already.

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