1

I am trying to use the PostgreSQL 9.5 and PostGIS address standardizer to parse an address field. The particular field in the table I am working with only has the street name and the street type (ex. 'MAIN ST'). Ultimately what I would like to do is create an insert statement from the existing table into a new, empty table, but for now I will just settle for getting this to work.

I have created the 'address_standardizer_data_us' extension. But when I try to use the information directly from the Postgre documentation:

SELECT house_num, name, suftype, city, country, state, unit  FROM standardize_address('us_lex',
           'us_gaz', 'us_rules', 'One Devonshire Place, PH 301, Boston, MA 02109');

I get this error:

ERROR:  function standardize_address(unknown, unknown, unknown, unknown) does not exist
LINE 1: ..., name, suftype, city, country, state, unit  FROM standardiz...
                                                             ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.
********** Error **********

ERROR: function standardize_address(unknown, unknown, unknown, unknown) does not exist
SQL state: 42883
Hint: No function matches the given name and argument types. You might need to add explicit type casts.
Character: 67

What am I missing here? Can I substitute the string 'One Devonshire Place, PH 301, Boston, MA 02109' with a field name in an insert statment?

  • 1
    There is nothing wrong with your statement, the same statement works on my install. Did you run 'CREATE EXTENSION address_standardizer_data_us;' ? Sounds like your install didn't go right but I can't help with an install issue. – kttii Mar 3 '17 at 14:37
  • @kttii, yes I did create the extension – Matt Mar 3 '17 at 14:53
  • Make sure the extension is showing: SELECT * FROM pg_available_extensions WHERE name LIKE '%address%'; ... mine says version 2.2.2. The only other thing I can think of is a permission issue. – kttii Mar 3 '17 at 16:08
  • Mine is 2.2.1, do you think that makes a difference? – Matt Mar 3 '17 at 18:58
1

I did:

create extension address_standardizer;

to make it work with the same error.

I have postgis 2.2.2, postgres 9.3 and ubuntu 14.04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.