emailaddr
emailaddr
pg_emailaddr : Email address type for PostgreSQL
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 3850 | emailaddr | pg_emailaddr | 0 | TYPE | PostgreSQL | C |
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
--s-d-- | No | Yes | No | Yes | no | no |
| Relationships | |
|---|---|
| See Also | prefix semver unit pgpdf pglite_fusion md5hash asn1oid roaringbitmap |
+varatt.h
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | PIGSTY | 0 | 18 17 16 15 14 | pg_emailaddr | - |
| RPM | PIGSTY | 0 | 18 17 16 15 14 | pg_emailaddr_$v | - |
| DEB | PIGSTY | 0 | 18 17 16 15 14 | postgresql-$v-pg-emailaddr | - |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
el8.x86_64 | PIGSTY 0 | PIGSTY 0 | PIGSTY 0 | PIGSTY 0 | PIGSTY 0 |
el8.aarch64 | PIGSTY 0 | PIGSTY 0 | PIGSTY 0 | PIGSTY 0 | PIGSTY 0 |
el9.x86_64 | PIGSTY 0 | PIGSTY 0 | PIGSTY 0 | PIGSTY 0 | PIGSTY 0 |
el9.aarch64 | PIGSTY 0 | PIGSTY 0 | PIGSTY 0 | PIGSTY 0 | PIGSTY 0 |
el10.x86_64 | PIGSTY 0 | PIGSTY 0 | PIGSTY 0 | PIGSTY 0 | PIGSTY 0 |
el10.aarch64 | PIGSTY 0 | PIGSTY 0 | PIGSTY 0 | PIGSTY 0 | PIGSTY 0 |
d12.x86_64 | PIGSTY 0 | PIGSTY 0 | PIGSTY 0 | PIGSTY 0 | PIGSTY 0 |
d12.aarch64 | PIGSTY 0 | PIGSTY 0 | PIGSTY 0 | PIGSTY 0 | PIGSTY 0 |
d13.x86_64 | PIGSTY 0 | PIGSTY 0 | PIGSTY 0 | PIGSTY 0 | PIGSTY 0 |
d13.aarch64 | PIGSTY 0 | PIGSTY 0 | PIGSTY 0 | PIGSTY 0 | PIGSTY 0 |
u22.x86_64 | PIGSTY 0 | PIGSTY 0 | PIGSTY 0 | PIGSTY 0 | PIGSTY 0 |
u22.aarch64 | PIGSTY 0 | PIGSTY 0 | PIGSTY 0 | PIGSTY 0 | PIGSTY 0 |
u24.x86_64 | PIGSTY 0 | PIGSTY 0 | PIGSTY 0 | PIGSTY 0 | PIGSTY 0 |
u24.aarch64 | PIGSTY 0 | PIGSTY 0 | PIGSTY 0 | PIGSTY 0 | PIGSTY 0 |
Source
pig build pkg pg_emailaddr; # build rpm/debInstall
Make sure PGDG and PIGSTY repo available:
pig repo add pgsql -u # add both repo and update cacheInstall this extension with pig:
pig install pg_emailaddr; # install via package name, for the active PG version
pig install emailaddr; # install by extension name, for the current active PG version
pig install emailaddr -v 18; # install for PG 18
pig install emailaddr -v 17; # install for PG 17
pig install emailaddr -v 16; # install for PG 16
pig install emailaddr -v 15; # install for PG 15
pig install emailaddr -v 14; # install for PG 14Create this extension with:
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', 'peter@eisentraut.org');Data Type
The emailaddr type validates email addresses on input according to RFC 5322 addr-spec rules. Simple formats like user@domain.com are accepted. Display name syntax such as "User Name" <user@domain.com> is not supported.
Operators
Standard comparison operators are supported: =, <>, <, >, <=, >=.
Index Support
Btree indexes are available for efficient lookups and sorting on emailaddr columns.
Last updated on