pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andreas Joseph Krogh <andreas@visena.com>
To: pgsql-general@postgresql.org
Subject: Re: Build in function to verify email addresses
Date: Thu, 16 Nov 2017 16:44:38 +0100 (CET)
Message-ID: <VisenaEmail.3c.e72c0fdb7a7a4947.15fc57db6b5@tc7-visena> (raw)
In-Reply-To: <CAFj8pRDK5VyD295foQVfQiqmv+AbuL0O2Sot5T2pnAotizC3ww@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-general>

På torsdag 16. november 2017 kl. 09:05:00, skrev Pavel Stehule <
pavel.stehule@gmail.com <mailto:pavel.stehule@gmail.com>>:
Hi   2017-11-16 8:56 GMT+01:00 Nick Dro <postgresql@walla.co.il 
<mailto:postgresql@walla.co.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@YYY.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@visena.com <mailto:andreas@visena.com>
www.visena.com <https://www.visena.com;
 <https://www.visena.com;


 

view thread (6+ messages)  latest in thread

Message-ID: <VisenaEmail.3c.e72c0fdb7a7a4947.15fc57db6b5@tc7-visena>
Permalink:  ../VisenaEmail.3c.e72c0fdb7a7a4947.15fc57db6b5@tc7-visena/
Also on:    postgresql.org/message-id/VisenaEmail.3c.e72c0fdb7a7a4947.15fc57db6b5@tc7-visena

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: andreas@visena.com
  Subject: Re: Build in function to verify email addresses
  In-Reply-To: <VisenaEmail.3c.e72c0fdb7a7a4947.15fc57db6b5@tc7-visena>
  References: <CAFj8pRDK5VyD295foQVfQiqmv+AbuL0O2Sot5T2pnAotizC3ww@mail.gmail.com> <VisenaEmail.3c.e72c0fdb7a7a4947.15fc57db6b5@tc7-visena>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox