Data typesversion 1.6
citext
Case-insensitive text, for emails and user names.
What it is for
citext is a text type that compares case-insensitively. A unique constraint on a citext email column stops Ana@Example.com and ana@example.com from becoming two accounts, without lower() calls in every query and index.
Enable it
create extension if not exists citext with schema extensions;Example
create table accounts (
id bigint generated always as identity primary key,
email citext not null unique
);
select * from accounts where email = 'ANA@EXAMPLE.COM';Questions
How do I enable citext?
Run create extension if not exists citext with schema extensions; in the SQL editor, or switch it on from the Extensions page in the console. You do not need superuser access.
Which version of citext is installed?
1.6, on Postgres 17.6, as read from the running engine on 2026-10-08. Check yours with: select extversion from pg_extension where extname = 'citext';
Upstream project: www.postgresql.org/docs/17/citext.html