Skip to content

emailaddr

Email address type for PostgreSQL

pg_emailaddr · Email address type for PostgreSQL

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
3810emailaddrpg_emailaddr0TYPEUnknownC
AttributeHas BinaryHas LibraryNeed LoadHas DDLRelocatableTrusted
--s-d-rNoYesNoYesyesno
+varatt.h, no valid license, distribution suspend

Packages

TypeRepoVersionPG Major CompatibilityPackage PatternDependencies
EXTPIGSTY019 18 17 16 15pg_emailaddr-
RPMPIGSTY019 18 17 16 15pg_emailaddr_$v-
DEBPIGSTY019 18 17 16 15postgresql-$v-pg-emailaddr-
Linux / PGPG19PG18PG17PG16PG15
el8.x86_64N/APIGSTY 0PIGSTY 0PIGSTY 0PIGSTY 0
el8.aarch64N/APIGSTY 0PIGSTY 0PIGSTY 0PIGSTY 0
el9.x86_64PIGSTY 0PIGSTY 0PIGSTY 0PIGSTY 0PIGSTY 0
el9.aarch64PIGSTY 0PIGSTY 0PIGSTY 0PIGSTY 0PIGSTY 0
el10.x86_64PIGSTY 0PIGSTY 0PIGSTY 0PIGSTY 0PIGSTY 0
el10.aarch64PIGSTY 0PIGSTY 0PIGSTY 0PIGSTY 0PIGSTY 0
d12.x86_64PIGSTY 0PIGSTY 0PIGSTY 0PIGSTY 0PIGSTY 0
d12.aarch64PIGSTY 0PIGSTY 0PIGSTY 0PIGSTY 0PIGSTY 0
d13.x86_64PIGSTY 0PIGSTY 0PIGSTY 0PIGSTY 0PIGSTY 0
d13.aarch64PIGSTY 0PIGSTY 0PIGSTY 0PIGSTY 0PIGSTY 0
u22.x86_64PIGSTY 0PIGSTY 0PIGSTY 0PIGSTY 0PIGSTY 0
u22.aarch64PIGSTY 0PIGSTY 0PIGSTY 0PIGSTY 0PIGSTY 0
u24.x86_64PIGSTY 0PIGSTY 0PIGSTY 0PIGSTY 0PIGSTY 0
u24.aarch64PIGSTY 0PIGSTY 0PIGSTY 0PIGSTY 0PIGSTY 0
u26.x86_64PIGSTY 0PIGSTY 0PIGSTY 0PIGSTY 0PIGSTY 0
u26.aarch64PIGSTY 0PIGSTY 0PIGSTY 0PIGSTY 0PIGSTY 0
PackageVersionOSORGSIZEFile URL
pg_emailaddr_190el9.x86_64pigsty21.2 KiBpg_emailaddr_19-0-4PGSTY.el9.x86_64.rpm
pg_emailaddr_190el9.aarch64pigsty20.8 KiBpg_emailaddr_19-0-4PGSTY.el9.aarch64.rpm
pg_emailaddr_190el10.x86_64pigsty21.2 KiBpg_emailaddr_19-0-4PGSTY.el10.x86_64.rpm
pg_emailaddr_190el10.aarch64pigsty21.2 KiBpg_emailaddr_19-0-4PGSTY.el10.aarch64.rpm
postgresql-19-pg-emailaddr0d12.x86_64pigsty12.7 KiBpostgresql-19-pg-emailaddr_0-3PGSTY~bookworm_amd64.deb
postgresql-19-pg-emailaddr0d12.aarch64pigsty12.7 KiBpostgresql-19-pg-emailaddr_0-3PGSTY~bookworm_arm64.deb
postgresql-19-pg-emailaddr0d13.x86_64pigsty12.6 KiBpostgresql-19-pg-emailaddr_0-3PGSTY~trixie_amd64.deb
postgresql-19-pg-emailaddr0d13.aarch64pigsty12.8 KiBpostgresql-19-pg-emailaddr_0-3PGSTY~trixie_arm64.deb
postgresql-19-pg-emailaddr0u22.x86_64pigsty13.0 KiBpostgresql-19-pg-emailaddr_0-3PGSTY~jammy_amd64.deb
postgresql-19-pg-emailaddr0u22.aarch64pigsty12.9 KiBpostgresql-19-pg-emailaddr_0-3PGSTY~jammy_arm64.deb
postgresql-19-pg-emailaddr0u24.x86_64pigsty13.2 KiBpostgresql-19-pg-emailaddr_0-3PGSTY~noble_amd64.deb
postgresql-19-pg-emailaddr0u24.aarch64pigsty13.2 KiBpostgresql-19-pg-emailaddr_0-3PGSTY~noble_arm64.deb
postgresql-19-pg-emailaddr0u26.x86_64pigsty13.2 KiBpostgresql-19-pg-emailaddr_0-3PGSTY~resolute_amd64.deb
postgresql-19-pg-emailaddr0u26.aarch64pigsty13.4 KiBpostgresql-19-pg-emailaddr_0-3PGSTY~resolute_arm64.deb
PackageVersionOSORGSIZEFile URL
pg_emailaddr_180el8.x86_64pigsty20.9 KiBpg_emailaddr_18-0-4PGSTY.el8.x86_64.rpm
pg_emailaddr_180el8.aarch64pigsty20.7 KiBpg_emailaddr_18-0-4PGSTY.el8.aarch64.rpm
pg_emailaddr_180el9.x86_64pigsty21.2 KiBpg_emailaddr_18-0-4PGSTY.el9.x86_64.rpm
pg_emailaddr_180el9.aarch64pigsty20.8 KiBpg_emailaddr_18-0-4PGSTY.el9.aarch64.rpm
pg_emailaddr_180el10.x86_64pigsty21.2 KiBpg_emailaddr_18-0-4PGSTY.el10.x86_64.rpm
pg_emailaddr_180el10.aarch64pigsty21.2 KiBpg_emailaddr_18-0-4PGSTY.el10.aarch64.rpm
postgresql-18-pg-emailaddr0d12.x86_64pigsty12.7 KiBpostgresql-18-pg-emailaddr_0-3PGSTY~bookworm_amd64.deb
postgresql-18-pg-emailaddr0d12.aarch64pigsty12.7 KiBpostgresql-18-pg-emailaddr_0-3PGSTY~bookworm_arm64.deb
postgresql-18-pg-emailaddr0d13.x86_64pigsty12.7 KiBpostgresql-18-pg-emailaddr_0-3PGSTY~trixie_amd64.deb
postgresql-18-pg-emailaddr0d13.aarch64pigsty12.8 KiBpostgresql-18-pg-emailaddr_0-3PGSTY~trixie_arm64.deb
postgresql-18-pg-emailaddr0u22.x86_64pigsty13.0 KiBpostgresql-18-pg-emailaddr_0-3PGSTY~jammy_amd64.deb
postgresql-18-pg-emailaddr0u22.aarch64pigsty12.9 KiBpostgresql-18-pg-emailaddr_0-3PGSTY~jammy_arm64.deb
postgresql-18-pg-emailaddr0u24.x86_64pigsty13.2 KiBpostgresql-18-pg-emailaddr_0-3PGSTY~noble_amd64.deb
postgresql-18-pg-emailaddr0u24.aarch64pigsty13.2 KiBpostgresql-18-pg-emailaddr_0-3PGSTY~noble_arm64.deb
postgresql-18-pg-emailaddr0u26.x86_64pigsty13.2 KiBpostgresql-18-pg-emailaddr_0-3PGSTY~resolute_amd64.deb
postgresql-18-pg-emailaddr0u26.aarch64pigsty13.4 KiBpostgresql-18-pg-emailaddr_0-3PGSTY~resolute_arm64.deb
PackageVersionOSORGSIZEFile URL
pg_emailaddr_170el8.x86_64pigsty20.9 KiBpg_emailaddr_17-0-4PGSTY.el8.x86_64.rpm
pg_emailaddr_170el8.aarch64pigsty20.7 KiBpg_emailaddr_17-0-4PGSTY.el8.aarch64.rpm
pg_emailaddr_170el9.x86_64pigsty21.2 KiBpg_emailaddr_17-0-4PGSTY.el9.x86_64.rpm
pg_emailaddr_170el9.aarch64pigsty20.8 KiBpg_emailaddr_17-0-4PGSTY.el9.aarch64.rpm
pg_emailaddr_170el10.x86_64pigsty21.2 KiBpg_emailaddr_17-0-4PGSTY.el10.x86_64.rpm
pg_emailaddr_170el10.aarch64pigsty21.2 KiBpg_emailaddr_17-0-4PGSTY.el10.aarch64.rpm
postgresql-17-pg-emailaddr0d12.x86_64pigsty12.7 KiBpostgresql-17-pg-emailaddr_0-3PGSTY~bookworm_amd64.deb
postgresql-17-pg-emailaddr0d12.aarch64pigsty12.7 KiBpostgresql-17-pg-emailaddr_0-3PGSTY~bookworm_arm64.deb
postgresql-17-pg-emailaddr0d13.x86_64pigsty12.7 KiBpostgresql-17-pg-emailaddr_0-3PGSTY~trixie_amd64.deb
postgresql-17-pg-emailaddr0d13.aarch64pigsty12.8 KiBpostgresql-17-pg-emailaddr_0-3PGSTY~trixie_arm64.deb
postgresql-17-pg-emailaddr0u22.x86_64pigsty13.3 KiBpostgresql-17-pg-emailaddr_0-3PGSTY~jammy_amd64.deb
postgresql-17-pg-emailaddr0u22.aarch64pigsty13.2 KiBpostgresql-17-pg-emailaddr_0-3PGSTY~jammy_arm64.deb
postgresql-17-pg-emailaddr0u24.x86_64pigsty13.2 KiBpostgresql-17-pg-emailaddr_0-3PGSTY~noble_amd64.deb
postgresql-17-pg-emailaddr0u24.aarch64pigsty13.2 KiBpostgresql-17-pg-emailaddr_0-3PGSTY~noble_arm64.deb
postgresql-17-pg-emailaddr0u26.x86_64pigsty13.2 KiBpostgresql-17-pg-emailaddr_0-3PGSTY~resolute_amd64.deb
postgresql-17-pg-emailaddr0u26.aarch64pigsty13.4 KiBpostgresql-17-pg-emailaddr_0-3PGSTY~resolute_arm64.deb
PackageVersionOSORGSIZEFile URL
pg_emailaddr_160el8.x86_64pigsty20.9 KiBpg_emailaddr_16-0-4PGSTY.el8.x86_64.rpm
pg_emailaddr_160el8.aarch64pigsty20.7 KiBpg_emailaddr_16-0-4PGSTY.el8.aarch64.rpm
pg_emailaddr_160el9.x86_64pigsty21.2 KiBpg_emailaddr_16-0-4PGSTY.el9.x86_64.rpm
pg_emailaddr_160el9.aarch64pigsty20.8 KiBpg_emailaddr_16-0-4PGSTY.el9.aarch64.rpm
pg_emailaddr_160el10.x86_64pigsty21.2 KiBpg_emailaddr_16-0-4PGSTY.el10.x86_64.rpm
pg_emailaddr_160el10.aarch64pigsty21.2 KiBpg_emailaddr_16-0-4PGSTY.el10.aarch64.rpm
postgresql-16-pg-emailaddr0d12.x86_64pigsty12.7 KiBpostgresql-16-pg-emailaddr_0-3PGSTY~bookworm_amd64.deb
postgresql-16-pg-emailaddr0d12.aarch64pigsty12.7 KiBpostgresql-16-pg-emailaddr_0-3PGSTY~bookworm_arm64.deb
postgresql-16-pg-emailaddr0d13.x86_64pigsty12.7 KiBpostgresql-16-pg-emailaddr_0-3PGSTY~trixie_amd64.deb
postgresql-16-pg-emailaddr0d13.aarch64pigsty12.8 KiBpostgresql-16-pg-emailaddr_0-3PGSTY~trixie_arm64.deb
postgresql-16-pg-emailaddr0u22.x86_64pigsty13.3 KiBpostgresql-16-pg-emailaddr_0-3PGSTY~jammy_amd64.deb
postgresql-16-pg-emailaddr0u22.aarch64pigsty13.2 KiBpostgresql-16-pg-emailaddr_0-3PGSTY~jammy_arm64.deb
postgresql-16-pg-emailaddr0u24.x86_64pigsty13.2 KiBpostgresql-16-pg-emailaddr_0-3PGSTY~noble_amd64.deb
postgresql-16-pg-emailaddr0u24.aarch64pigsty13.2 KiBpostgresql-16-pg-emailaddr_0-3PGSTY~noble_arm64.deb
postgresql-16-pg-emailaddr0u26.x86_64pigsty13.2 KiBpostgresql-16-pg-emailaddr_0-3PGSTY~resolute_amd64.deb
postgresql-16-pg-emailaddr0u26.aarch64pigsty13.4 KiBpostgresql-16-pg-emailaddr_0-3PGSTY~resolute_arm64.deb
PackageVersionOSORGSIZEFile URL
pg_emailaddr_150el8.x86_64pigsty20.9 KiBpg_emailaddr_15-0-4PGSTY.el8.x86_64.rpm
pg_emailaddr_150el8.aarch64pigsty20.7 KiBpg_emailaddr_15-0-4PGSTY.el8.aarch64.rpm
pg_emailaddr_150el9.x86_64pigsty21.2 KiBpg_emailaddr_15-0-4PGSTY.el9.x86_64.rpm
pg_emailaddr_150el9.aarch64pigsty20.8 KiBpg_emailaddr_15-0-4PGSTY.el9.aarch64.rpm
pg_emailaddr_150el10.x86_64pigsty21.2 KiBpg_emailaddr_15-0-4PGSTY.el10.x86_64.rpm
pg_emailaddr_150el10.aarch64pigsty21.2 KiBpg_emailaddr_15-0-4PGSTY.el10.aarch64.rpm
postgresql-15-pg-emailaddr0d12.x86_64pigsty12.7 KiBpostgresql-15-pg-emailaddr_0-3PGSTY~bookworm_amd64.deb
postgresql-15-pg-emailaddr0d12.aarch64pigsty12.7 KiBpostgresql-15-pg-emailaddr_0-3PGSTY~bookworm_arm64.deb
postgresql-15-pg-emailaddr0d13.x86_64pigsty12.7 KiBpostgresql-15-pg-emailaddr_0-3PGSTY~trixie_amd64.deb
postgresql-15-pg-emailaddr0d13.aarch64pigsty12.8 KiBpostgresql-15-pg-emailaddr_0-3PGSTY~trixie_arm64.deb
postgresql-15-pg-emailaddr0u22.x86_64pigsty13.3 KiBpostgresql-15-pg-emailaddr_0-3PGSTY~jammy_amd64.deb
postgresql-15-pg-emailaddr0u22.aarch64pigsty13.2 KiBpostgresql-15-pg-emailaddr_0-3PGSTY~jammy_arm64.deb
postgresql-15-pg-emailaddr0u24.x86_64pigsty13.2 KiBpostgresql-15-pg-emailaddr_0-3PGSTY~noble_amd64.deb
postgresql-15-pg-emailaddr0u24.aarch64pigsty13.2 KiBpostgresql-15-pg-emailaddr_0-3PGSTY~noble_arm64.deb
postgresql-15-pg-emailaddr0u26.x86_64pigsty13.2 KiBpostgresql-15-pg-emailaddr_0-3PGSTY~resolute_amd64.deb
postgresql-15-pg-emailaddr0u26.aarch64pigsty13.4 KiBpostgresql-15-pg-emailaddr_0-3PGSTY~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 by package name
pig install emailaddr;		# install by extension name

pig install emailaddr -v 19;   # install for PG 19
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

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.

Table reader