Re: Sorting street addresses

From: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Sorting street addresses
Date: 2004-10-29 11:22:56
Message-ID: b3c400445eee060a2d1aec1365a5bdb9@biglumber.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)turnstep(dot)com
PGP Key: 0x14964AC8 200410290722

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

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Joel 2004-10-29 11:47:49 Re: {OT?] Auth_PG_grp_group_field directive gives parameter error
Previous Message Karsten Hilbert 2004-10-29 11:05:11 Re: Creating database problem