Skip to content

pg_lion_citext

Case-insensitive citext operator class for lion indexes

pg_lion · Case-insensitive citext operator class for lion indexes

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
2716pg_lion_citextpg_lion0.3.0FEATPostgreSQLSQL
AttributeHas BinaryHas LibraryNeed LoadHas DDLRelocatableTrusted
----d-rNoNoNoYesyesno
Relationships
Requirespg_lion citext
Siblingspg_lion pg_lion_vector

Packages

TypeRepoVersionPG Major CompatibilityPackage PatternDependencies
EXTPIGSTY0.3.019 18 17 16 15pg_lionpg_lion, citext
RPMPIGSTY0.3.019 18 17 16 15pg_lion_$vpostgresql$v-contrib
DEBPIGSTY0.3.019 18 17 16 15postgresql-$v-pg-lion-
Linux / PGPG19PG18PG17PG16PG15
el8.x86_64N/APIGSTY 0.3.0PIGSTY 0.3.0PIGSTY 0.3.0N/A
el8.aarch64N/APIGSTY 0.3.0PIGSTY 0.3.0PIGSTY 0.3.0N/A
el9.x86_64PIGSTY 0.3.0PIGSTY 0.3.0PIGSTY 0.3.0PIGSTY 0.3.0N/A
el9.aarch64PIGSTY 0.3.0PIGSTY 0.3.0PIGSTY 0.3.0PIGSTY 0.3.0N/A
el10.x86_64PIGSTY 0.3.0PIGSTY 0.3.0PIGSTY 0.3.0PIGSTY 0.3.0N/A
el10.aarch64PIGSTY 0.3.0PIGSTY 0.3.0PIGSTY 0.3.0PIGSTY 0.3.0N/A
d12.x86_64PIGSTY 0.3.0PIGSTY 0.3.0PIGSTY 0.3.0PIGSTY 0.3.0N/A
d12.aarch64PIGSTY 0.3.0PIGSTY 0.3.0PIGSTY 0.3.0PIGSTY 0.3.0N/A
d13.x86_64PIGSTY 0.3.0PIGSTY 0.3.0PIGSTY 0.3.0PIGSTY 0.3.0N/A
d13.aarch64PIGSTY 0.3.0PIGSTY 0.3.0PIGSTY 0.3.0PIGSTY 0.3.0N/A
u22.x86_64PIGSTY 0.3.0PIGSTY 0.3.0PIGSTY 0.3.0PIGSTY 0.3.0N/A
u22.aarch64PIGSTY 0.3.0PIGSTY 0.3.0PIGSTY 0.3.0PIGSTY 0.3.0N/A
u24.x86_64PIGSTY 0.3.0PIGSTY 0.3.0PIGSTY 0.3.0PIGSTY 0.3.0N/A
u24.aarch64PIGSTY 0.3.0PIGSTY 0.3.0PIGSTY 0.3.0PIGSTY 0.3.0N/A
u26.x86_64PIGSTY 0.3.0PIGSTY 0.3.0PIGSTY 0.3.0PIGSTY 0.3.0N/A
u26.aarch64PIGSTY 0.3.0PIGSTY 0.3.0PIGSTY 0.3.0PIGSTY 0.3.0N/A

Source

pig build pkg pg_lion;		# 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_lion;		# install by package name
pig install pg_lion_citext;		# install by extension name

pig install pg_lion_citext -v 19;   # install for PG 19
pig install pg_lion_citext -v 18;   # install for PG 18
pig install pg_lion_citext -v 17;   # install for PG 17
pig install pg_lion_citext -v 16;   # install for PG 16

Create this extension with:

CREATE EXTENSION pg_lion_citext CASCADE; -- requires pg_lion, citext

Usage

Sources:

pg_lion_citext 0.3.0 registers the citext_ops operator class for case-insensitive text keys in lion indexes. It is a SQL companion shipped with pg_lion, with no separate shared library.

Core Workflow

Create citext and pg_lion first, then enable the companion. Its default operator class uses citext hashing and comparison functions for equality, inequality and ranges (=, <>, <, <=, >=, >).

CREATE EXTENSION citext;
CREATE EXTENSION pg_lion;
CREATE EXTENSION pg_lion_citext;
CREATE TABLE lion_contacts (email citext);
INSERT INTO lion_contacts VALUES ('Ada@example.com'), ('ADA@example.com');
CREATE INDEX lion_email ON lion_contacts USING lion (email);
SELECT count(*) FROM lion_contacts WHERE email = 'ada@example.com';

The example returns two rows in the count because both spellings compare equal. Applications keep using ordinary citext predicates.

Operational Boundaries

Requires PostgreSQL 16 or later and superuser installation. Case folding and ordering follow citext semantics. Use matching files from the parent distribution. The parent indexes retain their visibility, VACUUM, and optional custom-WAL preload requirements. This companion does not enable preloading or change existing indexes by itself.

Table reader