Re: Looking for types: phone number, email addresses

From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: Stephane Bortzmeyer <bortzmeyer(at)nic(dot)fr>
Cc: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>, pgsql-general(at)postgresql(dot)org
Subject: Re: Looking for types: phone number, email addresses
Date: 2002-07-19 14:51:46
Message-ID: 3D382782.C4CA325B@Yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Stephane Bortzmeyer wrote:
>
> On Fri, Jul 19, 2002 at 02:47:43PM +0100,
> Oliver Elphick <olly(at)lfix(dot)co(dot)uk> wrote
> a message of 25 lines which said:
>
> > 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.
>
> OK, let's check:
>
> CHECK (phone ~ '^\\+[0-9]+[ 0-9]+$')

Many phone systems here in the US use a central phone number and then
touch tone dialing for the extension you want to reach. Written it looks
like

+1 234 567-8901 x234

where the extension can have any number of digits (depends on the phone
system, usually 3 or 4).

Also since nearly all phones here have letters, it is very common to
give you easy to remember phone numbers like 1-800-UCALLME which in
reality is 1-800-822-5563.

I don't think that restricting it one way or the other is a good idea at
all. It doesn't prevent from entering the wrong number anyway, so what
good is it?

Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck(at)Yahoo(dot)com #

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian 'Dagurashibanipal' von Bidder 2002-07-19 15:00:43 Re: COMMIT in PostgreSQL
Previous Message Stephane Bortzmeyer 2002-07-19 14:44:40 Re: Looking for types: phone number, email addresses