Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iUXlu-0000ra-CE for pgsql-sql@arkaria.postgresql.org; Tue, 12 Nov 2019 15:07:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iUXlt-0005aK-3y for pgsql-sql@arkaria.postgresql.org; Tue, 12 Nov 2019 15:07:57 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iUXls-0005a9-S7 for pgsql-sql@lists.postgresql.org; Tue, 12 Nov 2019 15:07:56 +0000 Received: from mailbackend.panix.com ([166.84.1.89]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iUXll-0002r6-NP for pgsql-sql@lists.postgresql.org; Tue, 12 Nov 2019 15:07:56 +0000 Received: from panix2.panix.com (panix2.panix.com [166.84.1.2]) by mailbackend.panix.com (Postfix) with ESMTP id 47CB1v2c0vz1STZ for ; Tue, 12 Nov 2019 10:07:47 -0500 (EST) Received: by panix2.panix.com (Postfix, from userid 17622) id 47CB1v1SVrz1ZVj; Tue, 12 Nov 2019 10:07:47 -0500 (EST) Date: Tue, 12 Nov 2019 10:07:47 -0500 From: stan To: pgsql-sql@lists.postgresql.org Subject: FW: Re: type for storing emails? Message-ID: <20191112150747.GA4004@panix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Editor: gVim User-Agent: Mutt/1.12.1 (2019-06-15) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Mon, Nov 11, 2019 at 12:29:03PM -0600, Rene Romero Benavides wrote: > On Mon, Nov 11, 2019 at 11:59 AM stan wrote: > > > Does anyone have a type they have developed for storing emails. I need > > to do that, and the things that are in my thoughts on this are storing it > > as > > a derived type of citext, as case should not matter, and enforcing the at > > sign with pretty much anything on the left side of it, and something that > > looks like a domain on the right side of it. > > > > > > -- > > "They that would give up essential liberty for temporary safety deserve > > neither liberty nor safety." > > -- Benjamin Franklin > > > > > > > How are you going to handle invalid / non existent emails? > For the moment, I am just going to verify that what is entered is a valid email format. Verifying that the email exists, may come later. Thanks for making me think about this, though. -- "They that would give up essential liberty for temporary safety deserve neither liberty nor safety." -- Benjamin Franklin