Re: US Telephone Number Type

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: US Telephone Number Type
Дата
Msg-id 20060710180758.GF17723@svana.org
обсуждение исходный текст
Ответ на US Telephone Number Type  ("Karen Hill" <karen_hill22@yahoo.com>)
Ответы Re: US Telephone Number Type  (Steve Atkins <steve@blighty.com>)
Re: US Telephone Number Type  (SCassidy@overlandstorage.com)
Список pgsql-general
On Mon, Jul 10, 2006 at 10:33:52AM -0700, Karen Hill wrote:
> Hello,
>
> How would one go about creating a US telephone type in the format of
> "(555)-555-5555" ?  I am at a loss on how it could be accomplished in
> the most correct way possible while not going into the various
> different country styles e.g. +01 (555) 555-5555.

How do you mean "styles". The above number is, when printed in standard
international format +15555555555. The number needed to dial
international is not relevent. What makes it tricky is that people
don't agree on how numbers should be formatted.

> Is the difficulty of creating a telephone type the reason it is not in
> postgresql already?

It wouldn't be hard, it's just not clear what the advantage is over
just having a string and some functions to display the number.

> Should the telephone type be able to do something such as:
>
> SELECT * from tableFOO where telephone.areacode = 555;

Maybe, but is that useful? Maybe America is different, but my
experience in NL and AU is that you rarely care about the areacode
anyway, so why would you want to pull it out?

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: Jorge Godoy
Дата:
Сообщение: Re: encoding bug or feature?
Следующее
От: Vivek Khera
Дата:
Сообщение: Re: US Telephone Number Type