Re: Looking for types: phone number, email addresses
От | Stephane Bortzmeyer |
---|---|
Тема | Re: Looking for types: phone number, email addresses |
Дата | |
Msg-id | 20020719143856.GA23953@nic.fr обсуждение исходный текст |
Ответ на | Re: Looking for types: phone number, email addresses (Lee Kindness <lkindness@csl.co.uk>) |
Ответы |
Re: Looking for types: phone number, email addresses
|
Список | 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 по дате отправления: