#5535 closed defect (fixed)

String handling in debug_standardize_address and standardize_address

Reported by: pramsey Owned by: robe
Priority: medium Milestone: PostGIS 3.4.1
Component: pagc_address_parser Version: 3.4.x
Keywords: Cc:

Description (last modified by pramsey)

The memory handling in debug_standardize_address is not super clean in the string building, it could stand to be cleaned up. In particular, don't do a bunch of length counting and addition and then palloc, just use StringInfo. Also don't use a bare sprintf, and rework that area also into using StringInfo.

Change History (9)

comment:1 by pramsey, 13 months ago

Description: modified (diff)

comment:2 by robe, 13 months ago

Component: postgispagc_address_parser
Owner: changed from pramsey to robe

comment:3 by robe, 12 months ago

Can you take a look a this pull request when you have the chance https://git.osgeo.org/gitea/postgis/postgis/pulls/162

Feel free to criticize to your hearts content. One thing that is frustrating me is the tab/space mix. You think I should apply astyle to it? Haven't used that in a long time. Do we still use that?

comment:4 by strk, 12 months ago

The astyle script created by make astyle checks astyle version and refuses to run if you don' thave 1.23 (as we had different results with different versions). It'd be hard to have that version nowadays so I dubt anyone is using that.

If you changed all lines I guess you could give it a consistent style with astyle (updating that astyle.sh script?). Just make sure .editorconfig will keep the choosen style afterwards.

comment:5 by Regina Obe <lr@…>, 12 months ago

In 283a06c6/git:

Address standardizer cleanup

in debug_address_standardizer
and address_standardiser functions

References #5535 for PostGIS 3.5.0

comment:6 by Regina Obe <lr@…>, 12 months ago

In 5e73e13e/git:

Address standardizer cleanup

in debug_address_standardizer
and address_standardiser functions

References #5535 for PostGIS 3.5.0

comment:7 by robe, 12 months ago

Summary: String handling in debug_standardize_addressString handling in debug_standardize_address and standardize_address

comment:8 by Regina Obe <lr@…>, 12 months ago

In 48fb165a/git:

Address standardizer cleanup

in debug_address_standardizer
and address_standardiser functions

References #5535 for PostGIS 3.4.1

comment:9 by robe, 12 months ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.