Re: Email data type - Mailing list pgsql-hackers

From Bruno Wolff III
Subject Re: Email data type
Date
Msg-id 20040517193012.GA24230@wolff.to
Whole thread Raw
In response to Re: Email data type  (Gaetano Mendola <mendola@bigfoot.com>)
List pgsql-hackers
On Mon, May 17, 2004 at 17:01:36 +0200, Gaetano Mendola <mendola@bigfoot.com> wrote:
> 
> Also the validator will validate emails in this form, if you are thinking to
> validate emails as:
> 
> "Gaetano M. Public"(junior)<gmendola@(new account)bigfoot.com>

That appears to be an rfc 2822 address. RFC 2821 addresses are more limited
in that they can't have comments but still escape special characters.

> 
> that are perfectly valid I think that it's a valid option to consider.

What you want to store depends on what you are going to do with the address.
If you don't need the comments, storing it as a local part and a domain
is probably best.

> About the domain literals, I think to validate it in the near future,
> rejecting private subnet according to this list:
> 
> 10.0.0.0 - 10.255.255.255
> 172.16.0.0 - 172.31.255.255
> 192.168.0.0 - 192.168.255.255
> 169.254.0.0 -169.254.255.255

That would depend on whether or not sending to those addresses would make
sense in your case.

> 
> I think I have to discard also the addresses with last octet equal to 256.

Email addresses are in ascii and hence bytes should only contain characters
with the codes 0 through 127.


pgsql-hackers by date:

Previous
From: "Magnus Hagander"
Date:
Subject: Re: Table Spaces
Next
From: Bruno Wolff III
Date:
Subject: Re: Email data type