Opened 9 years ago

Closed 9 years ago

#3166 closed defect (wontfix)

normalize_address gives invalid regular expression error on input with parentheses

Reported by: alexreinhart Owned by: robe
Priority: medium Milestone: PostGIS 2.1.8
Component: tiger geocoder Version: 2.1.x
Keywords: Cc:

Description

I'm geocoding addresses using 2013 TIGER data. I've encountered the following problem on a badly-formed address (which I have edited slightly):

crime=# SELECT normalize_address('307 Oakland Ave (Bouquet Garden a), Pittsburgh PA 15213');
ERROR:  invalid regular expression: parentheses () not balanced
CONTEXT:  PL/pgSQL function normalize_address(character varying) line 372 at assignment

Strangely, deleting the "a" makes this query work.

crime=# SELECT normalize_address('307 Oakland Ave (Bouquet Garden), Pittsburgh PA 15213');
             normalize_address              
--------------------------------------------
 (307,,Oakland,Ave,,,Pittsburgh,PA,15213,t)
(1 row)

My version is

PostgreSQL 9.3.8 on x86_64-unknown-linux-gnu, compiled by gcc (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4, 64-bit POSTGIS="2.1.2 r12389" GEOS="3.4.2-CAPI-1.8.2 r3921" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.10.1, released 2013/08/26" LIBXML="2.9.1" LIBJSON="UNKNOWN" RASTER

Thanks.

Change History (1)

comment:1 by robe, 9 years ago

Resolution: wontfix
Status: newclosed

Going to focus my attention on new address standardizer so not going to bother fixing this. The new address standardizer works fine with this:

SELECT pagc_normalize_address('307 Oakland Ave (Bouquet Garden a), Pittsburgh PA 15213');

outputs:

(307,,OAKLAND,AVE,,"# BOUQUET GARDEN A",PITTSBURGH,PA,15213,t)
Note: See TracTickets for help on using tickets.