Do you want to save the dashes??? Storing 'format' data seems to be wasteful of disk space, and it leads to search difficulties when users are allowed to freely enter characters. I normally store just the digits 0-9 in a varchar(12) field, and add formatting in views when I retrieve the data. That way, you can support other formats - even international formats.
Do you want to support international calls? (If so, a column for a country code will probably be needed.) Likewise for an extension. Per E.164, up to 12 digits could be required, excluding up to three digits for the country code.
In pg, you could create a function to return a 'properly' formatted phone number, which bases the format upon the country code field, and a view which uses that function...
Last edited by loquin; 11-29-10 at 17:15.
"Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
"I have my standards. They may be low, but I have them!" - Bette Middler
"It's a book about a Spanish guy named Manual. You should read it." - Dilbert