emailaddr

emailaddr

pg_emailaddr : Email address type for PostgreSQL

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
3850
emailaddr
pg_emailaddr
0
TYPE
PostgreSQL
C
AttributeHas BinaryHas LibraryNeed LoadHas DDLRelocatableTrusted
--s-d--
No
Yes
No
Yes
no
no
Relationships
See Also
prefix
semver
unit
pgpdf
pglite_fusion
md5hash
asn1oid
roaringbitmap

+varatt.h

Packages

TypeRepoVersionPG Major CompatibilityPackage PatternDependencies
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 / PGPG18PG17PG16PG15PG14
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/deb

Install

Make sure PGDG and PIGSTY repo available:

pig repo add pgsql -u   # add both repo and update cache

Install 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 14

Create this extension with:

CREATE EXTENSION emailaddr;

Usage

emailaddr: email address data type for PostgreSQL

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