pg_normalize_email

This Release
pg_normalize_email 1.0.9
Date
Status
Stable
Abstract
Normalize email addresses in PostgreSQL
Description
A PostgreSQL extension for normalizing emails.
Released By
abismo
License
PostgreSQL
Resources
Special Files
Tags

Extensions

pg_normalize_email 1.0.9

README

pg_normalize_email

A PostgreSQL extension for normalizing emails

Installation

make install

Usage

CREATE EXTENSION pg_normalize_email;
SELECT normalize_email('ExAmPle+spam@Gmail.com');
-- Output: example@gmail.com

SELECT normalize_email('User.Name+tag@GoogleMail.com');
-- Output: 'username@gmail.com'

SELECT normalize_email('foo@yaNdex.Ru');
-- Output: 'foo@ya.ru'

SELECT normalize_email('invalid@@example.com');
-- Output: ERROR:  Invalid email format "invalid@@example.com": expected exactly one "@", found 2