Opened 11 years ago

Closed 11 years ago

#2284 closed defect (fixed)

standardize_address doesn't accept schema qualified table names

Reported by: robe Owned by: robe
Priority: medium Milestone: PostGIS 2.1.0
Component: pagc_address_parser Version: master
Keywords: Cc:

Description

This could be a problem for some folks especially if they keep data in separate schemas for logical partitioning and happen to have all their lex, gaz, rules tables named the same for consistency or to support multitenancy apps.

Observe:

select (std).* from (
    select standardize_address('public.lex', 'public.gaz', 'public.rules', micro, macro) as std
      from addresses) as foo;

Yields error:

NOTICE:  load_lex: lex and gaz table names may only be alphanum and '_' (public.lex)


ERROR:  CreateStd: failed to load 'public.lex' for lexicon


********** Error **********

ERROR: CreateStd: failed to load 'public.lex' for lexicon
SQL state: XX000

Change History (3)

comment:1 by robe, 11 years ago

Also need to support this syntax:

select (std).* from (
    select standardize_address('"public"."lex"', '"public"."gaz"', '"public"."rules"', micro, macro) as std
      from addresses) as foo;

Since if people are anal enough or crazy enought to use mixed case in their tables they'll want/need to quote their tables and their schemas

comment:2 by woodbri, 11 years ago

The current code supports the following syntax:

select (std).* from (
    select standardize_address('public.lex', 'public.gaz', 'public.rules', micro, macro) as std
      from addresses) as foo;

I can probably allow '"' chars to be ok also.

comment:3 by woodbri, 11 years ago

Resolution: fixed
Status: newclosed

Updated in revision 357. to allow " chars.

Note: See TracTickets for help on using tickets.