Re: Looking for types: phone number, email addresses - Mailing list pgsql-general

From Oliver Elphick
Subject Re: Looking for types: phone number, email addresses
Date
Msg-id 1027086463.9743.373.camel@linda
Whole thread Raw
In response to Looking for types: phone number, email addresses  (Stephane Bortzmeyer <bortzmeyer@nic.fr>)
Responses Re: Looking for types: phone number, email addresses
List pgsql-general
On Fri, 2002-07-19 at 12:52, Stephane Bortzmeyer wrote:
> Lazy programmer is looking for implementation of the following
> datatypes:
>
> * phone (or fax) numbers (with format checking) like +33 1 39 30 83 46

CHECK (phone ~ '^\\+33 [0-9]( [0-9]{2}){4}$')

That's only good for French numbers, since only France uses that
grouping of digits for phone numbers.  (Which is why +33 is explicit.)

--
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight, UK
http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "Blessed is the man that trusteth in the LORD, and
      whose hope the LORD is."            Jeremiah 17:7


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: [SQL] id and ID in CREATE TABLE
Next
From: Tom Lane
Date:
Subject: Re: Problem using ?# with polygon