[ic] postcode field in state database

Jon Jensen jon at endpoint.com
Tue Apr 12 11:03:42 EDT 2005

On Tue, 12 Apr 2005, Jeff Fearn wrote:

> Hi, I have been looking in to internationalising validation of
> postcodes and states. Is the states database used for anything? I have
> grepped through the code and not found anything using it.
> I am specifically interested in the current use of the postcode field
> in the state database. I have started using it to hold regular
> expressions to validate postcodes against. I did have to enlarge
> postcode to 32 chars to fit the Canadian re's.
> Can anyone see this breaking any exisiting or planned future use of
> the state.postcode field?

I think that's a great idea, Jeff, but I would like to see core code avoid 
referencing any database by name, or by particular column names, in a 
hardcoded way. There is no need whatsoever for Interchange to have a 
"country" or "state" table at the moment -- they just happen to be used in 
the demos. So there should be some way to specify table and column names 
that are different from what the demo supplies.

This is a general principle we've tried to adhere to in the core. You can 
specify alternate options tables, userdb table, etc.


Jon Jensen
End Point Corporation
Software development with Interchange, Perl, PostgreSQL, Apache, Linux, ...

More information about the interchange-users mailing list