emailaddr
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
pg_emailaddr | 0 | TYPE | PostgreSQL | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 3850 | emailaddr | No | Yes | No | Yes | No | No | - |
| Related | prefix semver unit pgpdf pglite_fusion md5hash asn1oid roaringbitmap |
|---|
+varatt.h
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PIGSTY | 0 | 1817161514 | pg_emailaddr | - |
| RPM | PIGSTY | 0 | 1817161514 | pg_emailaddr_$v | - |
| DEB | PIGSTY | 0 | 1817161514 | postgresql-$v-pg-emailaddr | - |
Build
You can build the RPM / DEB packages for pg_emailaddr using pig build:
pig build pkg pg_emailaddr # build RPM / DEB packages
Install
You can install pg_emailaddr directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
pig repo add pgsql -u # Add repo and update cache
Install the extension using pig or apt/yum/dnf:
pig install pg_emailaddr; # Install for current active PG version
pig ext install -y pg_emailaddr -v 18 # PG 18
pig ext install -y pg_emailaddr -v 17 # PG 17
pig ext install -y pg_emailaddr -v 16 # PG 16
pig ext install -y pg_emailaddr -v 15 # PG 15
pig ext install -y pg_emailaddr -v 14 # PG 14
dnf install -y pg_emailaddr_18 # PG 18
dnf install -y pg_emailaddr_17 # PG 17
dnf install -y pg_emailaddr_16 # PG 16
dnf install -y pg_emailaddr_15 # PG 15
dnf install -y pg_emailaddr_14 # PG 14
apt install -y postgresql-18-pg-emailaddr # PG 18
apt install -y postgresql-17-pg-emailaddr # PG 17
apt install -y postgresql-16-pg-emailaddr # PG 16
apt install -y postgresql-15-pg-emailaddr # PG 15
apt install -y postgresql-14-pg-emailaddr # PG 14
Create Extension:
CREATE EXTENSION emailaddr;
Usage
The emailaddr extension provides a data type for storing and validating email addresses conforming to the addr-spec format defined in RFC 5322.
CREATE EXTENSION emailaddr;
CREATE TABLE accounts (
id int PRIMARY KEY,
name text,
email emailaddr
);
INSERT INTO accounts VALUES (1, 'Peter Eisentraut', '[email protected]');
Data Type
The emailaddr type validates email addresses on input according to RFC 5322 addr-spec rules. Simple formats like [email protected] are accepted. Display name syntax such as "User Name" <[email protected]> is not supported.
Operators
Standard comparison operators are supported: =, <>, <, >, <=, >=.
Index Support
Btree indexes are available for efficient lookups and sorting on emailaddr columns.
Feedback
Was this page helpful?
Thanks for the feedback! Please let us know how we can improve.
Sorry to hear that. Please let us know how we can improve.