Re: Looking for types: phone number, email addresses

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: Stephane Bortzmeyer <bortzmeyer(at)nic(dot)fr>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Looking for types: phone number, email addresses
Date: 2002-07-19 13:47:43
Message-ID: 1027086463.9743.373.camel@linda
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)Elphick(at)lfix(dot)co(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-07-19 13:48:50 Re: COMMIT in PostgreSQL
Previous Message Tom Lane 2002-07-19 13:42:32 Re: Problem using ?# with polygon