Re: Looking for types: phone number, email addresses - Mailing list pgsql-general

From Stephane Bortzmeyer
Subject Re: Looking for types: phone number, email addresses
Date
Msg-id 20020719143856.GA23953@nic.fr
Whole thread Raw
In response to Re: Looking for types: phone number, email addresses  (Lee Kindness <lkindness@csl.co.uk>)
Responses Re: Looking for types: phone number, email addresses  (Josh Jore <josh@greentechnologist.org>)
List pgsql-general
On Fri, Jul 19, 2002 at 03:27:19PM +0100,
 Lee Kindness <lkindness@csl.co.uk> wrote
 a message of 20 lines which said:

> 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)?

Mostly by humans (I don't foresee automatic use) but the idea was to
catch mispellings (such as typing O "o" instead of 0 "zero").

Email addresses, on the other hand, *will* be used automatically
(opt-in only, do not worry).

At the present time, I use:

 -- Not perfectly RFC 2822-compliant :-(
 email TEXT NOT NULL CHECK (email ~ '^[a-zA-Z0-9\+\.\_\-]+@[a-zA-Z0-9\.\-]+$'),
 phone TEXT CHECK (phone ~ '^\\+[0-9]+[ 0-9]+$'),
 fax TEXT CHECK (fax ~ '^\\+[0-9]+[ 0-9]+$'),


pgsql-general by date:

Previous
From: Andrew Sullivan
Date:
Subject: Re: Too many clients to Postgresql server
Next
From: Jan Wieck
Date:
Subject: Re: Linux max on shared buffers?