Phone number type extension

Started by stanover 6 years ago4 messagesgeneral
Jump to latest
#1stan
stanb@panix.com

Is there any currently supported version of this? I found one using google,
but it looks like it was last updated around version 8 of Postgres.

--
"They that would give up essential liberty for temporary safety deserve
neither liberty nor safety."
-- Benjamin Franklin

#2Morris de Oryx
morrisdeoryx@gmail.com
In reply to: stan (#1)
Re: Phone number type extension

For clarification, what do you mean by "phone number"? I'm not being dense,
I'm wondering if you're looking for a type that handles only numbers from
one country, or that can deal with the rules for a variety of countries.

#3Ray O'Donnell
ray@rodonnell.ie
In reply to: Morris de Oryx (#2)
Re: Phone number type extension

On 28/09/2019 11:13, Morris de Oryx wrote:

For clarification, what do you mean by "phone number"? I'm not being
dense, I'm wondering if you're looking for a type that handles only
numbers from one country, or that can deal with the rules for a variety
of countries.

That was my first thought also. For example, here in Ireland we have
different numbers of digits in both area code and local number depending
on where in the country you are - and in fact, we can't always agree on
where the area code ends and the local number begins! :-)

Ray.

--
Raymond O'Donnell // Galway // Ireland
ray@rodonnell.ie

#4Andreas 'ads' Scherbaum
adsmail@wars-nicht.de
In reply to: stan (#1)
Re: Phone number type extension

On 28.09.19 11:11, stan wrote:

Is there any currently supported version of this? I found one using google,
but it looks like it was last updated around version 8 of Postgres.

Found this:

https://github.com/blm768/pg-libphonenumber

Might be used in a CHECK constraint to validate phone numbers,
or a BEFORE trigger can normalize (or reject) the input value.

Regards,

--
Andreas 'ads' Scherbaum
German PostgreSQL User Group
European PostgreSQL User Group - Board of Directors
Volunteer Regional Contact, Germany - PostgreSQL Project