Re: Postgre RAISE NOTICE and PHP

From: Jasen Betts <jasen(at)xnet(dot)co(dot)nz>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Postgre RAISE NOTICE and PHP
Date: 2009-08-20 12:52:57
Message-ID: h6jgv9$a7v$1@reversiblemaps.ath.cx
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2009-08-19, Clemens Schwaighofer <clemens_schwaighofer(at)e-gra(dot)co(dot)jp> wrote:
> On Wed, Aug 19, 2009 at 02:11, Randal L. Schwartz<merlyn(at)stonehenge(dot)com> wrote:
>>>>>>> "Andre" == Andre Lopes <lopes80andre(at)gmail(dot)com> writes:
>>
>> Andre> I'm developing a function with some checks, for example... to check if the
>> Andre> e-mail is valid or not.
>>
>> How are you hoping to do this?  The regex to validate an email
>> address syntactically is pretty large:
>>
>>  http://ex-parrot.com/~pdw/Mail-RFC822-Address.html
>>
>> And no, I'm not kidding.  If your regex is smaller than that, you aren't
>> validating email... you're validating something "kinda like email".
>
> Just in my opinion, this regex is completely too large. For basic
> validating something like:
> ^[A-Za-z0-9!#$%&'*+-\/=?^_`{|}~][A-Za-z0-9!#$%&'*+-\/=?^_`{|}~\.]{0,63}(at)[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]{1,})*\.([a-zA-Z]{2,4}){1}$
> works very well

not good: eg:

fails this valid address* : admin(at)xxxxxxx(dot)museum
accepts this invalid one : you(at)gmail(dot)(dot)com

"musedoma" replaced with several x to protect the innocent from spam

in some contexts email adrresses with no domain part are valid
addresses with [bracketed] mx servers instead of a domain and/or bang
paths are also allowed (but not in common use and often not desirable)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Karsten Hilbert 2009-08-20 12:53:35 Re: Re: Unit conversion database (was: multiple paramters in aggregate function)
Previous Message Karsten Hilbert 2009-08-20 12:52:22 Re: multiple paramters in aggregate function