From: | Lee Kindness <lkindness(at)csl(dot)co(dot)uk> |
---|---|
To: | Stephane Bortzmeyer <bortzmeyer(at)nic(dot)fr> |
Cc: | Oliver Elphick <olly(at)lfix(dot)co(dot)uk>, pgsql-general(at)postgresql(dot)org, Lee Kindness <lkindness(at)csl(dot)co(dot)uk> |
Subject: | Re: Looking for types: phone number, email addresses |
Date: | 2002-07-19 14:27:19 |
Message-ID: | 15672.8647.762495.46482@kelvin.csl.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Stephane Bortzmeyer writes:
> Oliver Elphick <olly(at)lfix(dot)co(dot)uk> wrote
> > CHECK (phone ~ '^\\+33 [0-9]( [0-9]{2}){4}$')
> > That's only good for French 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).
Still a loosing battle and IMO a needless constraint... For example
I'd normally write my work number as '+44 (0)131 557 5595' which the
above regex wouldn't grok... And it's also common in several counties
for people to use '.' and '-' as separators!
Is the field going to be used by humans (in which case they can sort
out minor formatting issues on the fly) or for automated dialing
(in which case you'd probably want to strip out everything bar
numerics)?
Lee.
From | Date | Subject | |
---|---|---|---|
Next Message | George.T.Essig | 2002-07-19 14:31:54 | Re: References for PostgreSQL |
Previous Message | Gregory Wood | 2002-07-19 14:12:25 | Re: 7.3 support for IN |