| 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 14:40:36 |
| Message-ID: | 1027089637.32686.377.camel@linda |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Fri, 2002-07-19 at 15:07, Stephane Bortzmeyer wrote:
> 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).
That would match "+0 ", which is probably not a valid number. You can
combine several patterns as alternatives in the CHECK constraint or even
put alternatives in the pattern.
--
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jan Wieck | 2002-07-19 14:41:28 | Re: Linux max on shared buffers? |
| Previous Message | Stephane Bortzmeyer | 2002-07-19 14:38:56 | Re: Looking for types: phone number, email addresses |