Skip to content
emailaddr

emailaddr

pg_emailaddr : Email address type for PostgreSQL

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
3800
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
u26.x86_64
PIGSTY 0
PIGSTY 0
PIGSTY 0
PIGSTY 0
PIGSTY 0
u26.aarch64
PIGSTY 0
PIGSTY 0
PIGSTY 0
PIGSTY 0
PIGSTY 0
PackageVersionOSORGSIZEFile URL
pg_emailaddr_180el8.x86_64pigsty13.8 KiBpg_emailaddr_18-0-1PIGSTY.el8.x86_64.rpm
pg_emailaddr_180el8.aarch64pigsty13.7 KiBpg_emailaddr_18-0-1PIGSTY.el8.aarch64.rpm
pg_emailaddr_180el9.x86_64pigsty13.6 KiBpg_emailaddr_18-0-1PIGSTY.el9.x86_64.rpm
pg_emailaddr_180el9.aarch64pigsty13.4 KiBpg_emailaddr_18-0-1PIGSTY.el9.aarch64.rpm
pg_emailaddr_180el10.x86_64pigsty13.6 KiBpg_emailaddr_18-0-1PIGSTY.el10.x86_64.rpm
pg_emailaddr_180el10.aarch64pigsty13.5 KiBpg_emailaddr_18-0-1PIGSTY.el10.aarch64.rpm
postgresql-18-pg-emailaddr0d12.x86_64pigsty12.5 KiBpostgresql-18-pg-emailaddr_0-2PIGSTY~bookworm_amd64.deb
postgresql-18-pg-emailaddr0d12.aarch64pigsty12.5 KiBpostgresql-18-pg-emailaddr_0-2PIGSTY~bookworm_arm64.deb
postgresql-18-pg-emailaddr0d13.x86_64pigsty12.5 KiBpostgresql-18-pg-emailaddr_0-2PIGSTY~trixie_amd64.deb
postgresql-18-pg-emailaddr0d13.aarch64pigsty12.6 KiBpostgresql-18-pg-emailaddr_0-2PIGSTY~trixie_arm64.deb
postgresql-18-pg-emailaddr0u22.x86_64pigsty12.8 KiBpostgresql-18-pg-emailaddr_0-2PIGSTY~jammy_amd64.deb
postgresql-18-pg-emailaddr0u22.aarch64pigsty12.7 KiBpostgresql-18-pg-emailaddr_0-2PIGSTY~jammy_arm64.deb
postgresql-18-pg-emailaddr0u24.x86_64pigsty13.0 KiBpostgresql-18-pg-emailaddr_0-2PIGSTY~noble_amd64.deb
postgresql-18-pg-emailaddr0u24.aarch64pigsty13.0 KiBpostgresql-18-pg-emailaddr_0-2PIGSTY~noble_arm64.deb
postgresql-18-pg-emailaddr0u26.x86_64pigsty13.0 KiBpostgresql-18-pg-emailaddr_0-2PIGSTY~resolute_amd64.deb
postgresql-18-pg-emailaddr0u26.aarch64pigsty13.2 KiBpostgresql-18-pg-emailaddr_0-2PIGSTY~resolute_arm64.deb

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