Re: Looking for types: phone number, email addresses

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

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]+$')

which is, I believe, international (although the above regexp does not
prevent strange things like two consecutive spaces).

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gregory Wood 2002-07-19 14:12:25 Re: 7.3 support for IN
Previous Message Andrew Sullivan 2002-07-19 14:05:20 Re: References for PostgreSQL