Re: Postgre RAISE NOTICE and PHP

From: Clemens Schwaighofer <clemens_schwaighofer(at)e-gra(dot)co(dot)jp>
To: Jasen Betts <jasen(at)xnet(dot)co(dot)nz>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Postgre RAISE NOTICE and PHP
Date: 2009-08-21 02:01:44
Message-ID: fed954960908201901n6ce3466ahbeaf8544fd9d5fe4@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Aug 20, 2009 at 21:52, Jasen Betts<jasen(at)xnet(dot)co(dot)nz> wrote:
> 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

yes it does, but all I need to change is {2,4}, to {2,6} or {2,}

> accepts this invalid one  : you(at)gmail(dot)(dot)com

and not it does not. I just tested it here.

The regex helps to avoid stuff like this:

foo](at)bar(dot)com
foo@@bar.com
foo(at)(dot)bar(dot)com
foo(at)bar

etc

>
> "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)
>
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

--
★ Clemens 呉 Schwaighofer
★ IT Engineer/Web Producer/Planning
★ E-Graphics Communications SP Digital
★ 6-17-2 Ginza Chuo-ku, Tokyo 104-8167, JAPAN
★ Tel: +81-(0)3-3545-7706
★ Fax: +81-(0)3-3545-7343
http://www.e-gra.co.jp
This e-mail is intended only for the named person or entity to which it is addressed and contains valuable business information that is privileged, confidential and/or otherwise protected from disclosure. If you received this e-mail in error, any review, use, dissemination, distribution or copying of this e-mail is strictly prohibited. Please notify us immediately of the error via e-mail to disclaimer(at)tbwaworld(dot)com and please delete the e-mail from your system, retaining no copies in any media. We appreciate your cooperation.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Seth Gordon 2009-08-21 02:40:45 Re: "Could not open relation XXX: No such file or directory"
Previous Message Scott Marlowe 2009-08-21 01:50:14 Re: R: Field's position in Table