Subject Re: [firebird-support] Re: Terrible left join performance
Author Doug Chamberlin
Have you considered using varchar(10) for United States postal code values
("zipcodes")? I would recommend thinking of these values as character data
even though the values are often numeric.

Once when I was using a database which used the integer type for zipcode
one of the software layers computed a subtraction operation when presented
with 01810-2773 as a zipcode value. This value has a valid zipcode format
which is quite common due to the USPS push for everyone to use Zip+4
values. Needless to say, I did NOT want these two codes subtracted from
each other!

Also, when you display zipcodes that are stored as integers you need to
handle displaying leading zeroes for both the first 5 digits and the
additional 4 digits in the Zip+4 format. This is a real pain compared to
storing the characters and displaying them as stored.