Re: Build in function to verify email addresses

From: Andreas Joseph Krogh <andreas(at)visena(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Build in function to verify email addresses
Date: 2017-11-16 15:44:38
Message-ID: VisenaEmail.3c.e72c0fdb7a7a4947.15fc57db6b5@tc7-visena
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

På torsdag 16. november 2017 kl. 09:05:00, skrev Pavel Stehule <
pavel(dot)stehule(at)gmail(dot)com <mailto:pavel(dot)stehule(at)gmail(dot)com>>:
Hi   2017-11-16 8:56 GMT+01:00 Nick Dro <postgresql(at)walla(dot)co(dot)il
<mailto:postgresql(at)walla(dot)co(dot)il>>: I beleieve that every information system has
the needs to send emails.
Currently PostgreSQL doesn't have a function which gets TEXT and return true
if it's valid email address (xxx(at)YYY(dot)com / .co.ZZ)
Do you believe such function should exist in PostgreSQL or it's best to let
every user to implement his own function?

 
I don't think so this functionality should be in upstream - but it is good
use for some extension and placing it in PGXN or PostgreSQL community
repository.
 
Postgres has good regexp support and this case can be implemented by one
regexp.
 
you can use PLPerlu and use some modules from CPAN
 
http://search.cpan.org/~rjbs/Email-Valid-1.202/lib/Email/Valid.pm
<http://search.cpan.org/~rjbs/Email-Valid-1.202/lib/Email/Valid.pm>
 
Regards
 
Pavel

 
In general, I see no reason for a modern RDBMS not to provide an
email-datatype. IMV that's no different from other types which also could have
been plain-text but are convenient to have datatypes for.
Being an open-source project I guess one must show initiative and start a
discussion on -hackers to see what interesst there's in having one in core. I
for one hope there will be.
 
-- Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
andreas(at)visena(dot)com <mailto:andreas(at)visena(dot)com>
www.visena.com <https://www.visena.com>
<https://www.visena.com>

 

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michael Nolan 2017-11-16 15:45:29 Re: Build in function to verify email addresses
Previous Message btober@computer.org 2017-11-16 15:13:39 Re: Build in function to verify email addresses