Re: Sorting street addresses - Mailing list pgsql-general

From Greg Sabino Mullane
Subject Re: Sorting street addresses
Date
Msg-id b3c400445eee060a2d1aec1365a5bdb9@biglumber.com
Whole thread Raw
In response to Sorting street addresses  (Robert Fitzpatrick <robert@webtent.com>)
List pgsql-general
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


> I would like all those on the same street grouped together. Is there any
> tricks to getting the street names sorted first, possibly where numbers
> and strings separate?

As some have demonstrated, this can be a difficult problem. Your best bet
is not to reinvent the wheel, but find someone who has already solved the
problem. For example:

http://search.cpan.org/dist/Lingua-EN-AddressParse/AddressParse.pm

You could easily use the above in a Pl/perl function, or just in Perl
if your application happens to be written in that. Worse case, check out the
source code of the module and see how they have done it and create your
own version.

- --
Greg Sabino Mullane greg@turnstep.com
PGP Key: 0x14964AC8 200410290722

-----BEGIN PGP SIGNATURE-----

iD8DBQFBgihdvJuQZxSWSsgRAvFBAKC1EcSW5Ru5+nZwNLenbRVqQlQP/wCgpvd6
TOiKff34E+DJVM7rcPkMACU=
=55zK
-----END PGP SIGNATURE-----



pgsql-general by date:

Previous
From: Karsten Hilbert
Date:
Subject: Re: Creating database problem
Next
From: Joel
Date:
Subject: Re: {OT?] Auth_PG_grp_group_field directive gives parameter error