[postgis-tickets] [PostGIS] #1599: normalize_address() confused by coutry

PostGIS trac at osgeo.org
Tue Apr 2 14:00:48 PDT 2013


#1599: normalize_address() confused by coutry
---------------------------------+------------------------------------------
 Reporter:  mikepease            |       Owner:  robe         
     Type:  defect               |      Status:  assigned     
 Priority:  medium               |   Milestone:  PostGIS 2.1.0
Component:  pagc_address_parser  |     Version:  trunk        
 Keywords:                       |  
---------------------------------+------------------------------------------
Changes (by robe):

  * version:  1.5.X => trunk


Comment:

 Steve,

 This one crashes my backend, (mingw32 installed on windows 7 32 VC++),
 though all the others I have tried work fine:


 {{{
 select * from pagc_normalize_address('212 n 3rd ave, Minneapolis, mn
 55401, USA')
 }}}

 Gets to start load rules and then hits the bucket. Works fine it I take
 off the , USA.

 I tried the original set to rule out my changes to the tables.


 {{{
 -- crashes --
 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('212 n 3rd ave, Minneapolis, mn 55401,
 USA') ) As a );
 }}}
 {{{
 -- also crashes --
 SELECT (SELECT standardize_address( 'select seq, word::text,
 stdword::text, token from gaz union all select seq, word::text,
 stdword::text, token from lex '
        , 'select seq, word::text, stdword::text, token from gaz order by
 id'
        , 'select * from 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('212 n 3rd ave, Minneapolis, mn 55401,
 USA') ) As a );
 }}}


 The log:

 {{{
 NOTICE:  Start standardize_address
 NOTICE:  start load_lex
 NOTICE:  Time to read 3764 lexicon records: 10.0 ms.
 NOTICE:  start load_lex
 NOTICE:  Time to read 834 lexicon records: 0.0 ms.
 NOTICE:  start load_rules
 }}}

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1599#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-tickets mailing list