Skip to content

pg_lion_citext

Case-insensitive citext operator class for lion indexes

Overview

PackageVersionCategoryLicenseLanguage
pg_lion0.3.0FEATPostgreSQLSQL
IDExtensionBinLibLoadCreateTrustRelocSchema
2715pg_lionNoYesNoYesNoYes-
2716pg_lion_citextNoNoNoYesNoYes-
2717pg_lion_vectorNoYesNoYesNoYes-

Version

TypeRepoVersionPG VerPackageDeps
EXTPIGSTY0.3.01817161514pg_lionpg_lion, citext
RPMPIGSTY0.3.01817161514pg_lion_$vpostgresql$v-contrib
DEBPIGSTY0.3.01817161514postgresql-$v-pg-lion-
OS / PGPG18PG17PG16PG15PG14
el8.x86_64PIGSTY 0.3.0PIGSTY 0.3.0PIGSTY 0.3.0N/AN/A
el8.aarch64PIGSTY 0.3.0PIGSTY 0.3.0PIGSTY 0.3.0N/AN/A
el9.x86_64PIGSTY 0.3.0PIGSTY 0.3.0PIGSTY 0.3.0N/AN/A
el9.aarch64PIGSTY 0.3.0PIGSTY 0.3.0PIGSTY 0.3.0N/AN/A
el10.x86_64PIGSTY 0.3.0PIGSTY 0.3.0PIGSTY 0.3.0N/AN/A
el10.aarch64PIGSTY 0.3.0PIGSTY 0.3.0PIGSTY 0.3.0N/AN/A
d12.x86_64PIGSTY 0.3.0PIGSTY 0.3.0PIGSTY 0.3.0N/AN/A
d12.aarch64PIGSTY 0.3.0PIGSTY 0.3.0PIGSTY 0.3.0N/AN/A
d13.x86_64PIGSTY 0.3.0PIGSTY 0.3.0PIGSTY 0.3.0N/AN/A
d13.aarch64PIGSTY 0.3.0PIGSTY 0.3.0PIGSTY 0.3.0N/AN/A
u22.x86_64PIGSTY 0.3.0PIGSTY 0.3.0PIGSTY 0.3.0N/AN/A
u22.aarch64PIGSTY 0.3.0PIGSTY 0.3.0PIGSTY 0.3.0N/AN/A
u24.x86_64PIGSTY 0.3.0PIGSTY 0.3.0PIGSTY 0.3.0N/AN/A
u24.aarch64PIGSTY 0.3.0PIGSTY 0.3.0PIGSTY 0.3.0N/AN/A
u26.x86_64PIGSTY 0.3.0PIGSTY 0.3.0PIGSTY 0.3.0N/AN/A
u26.aarch64PIGSTY 0.3.0PIGSTY 0.3.0PIGSTY 0.3.0N/AN/A

Build

You can build the RPM / DEB packages for pg_lion using pig build:

pig build pkg pg_lion         # build RPM / DEB packages

Install

You can install pg_lion directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:

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

Install the extension using pig or apt/yum/dnf:

Install
pig install pg_lion;          # Install for current active PG version
pig
pig ext install -y pg_lion -v 18  # PG 18
pig ext install -y pg_lion -v 17  # PG 17
pig ext install -y pg_lion -v 16  # PG 16
dnf
dnf install -y pg_lion_18       # PG 18
dnf install -y pg_lion_17       # PG 17
dnf install -y pg_lion_16       # PG 16
apt
apt install -y postgresql-18-pg-lion   # PG 18
apt install -y postgresql-17-pg-lion   # PG 17
apt install -y postgresql-16-pg-lion   # PG 16

Create Extension:

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 ('[email protected]'), ('[email protected]');
CREATE INDEX lion_email ON lion_contacts USING lion (email);
SELECT count(*) FROM lion_contacts WHERE email = '[email protected]';

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.

Was this page helpful?

Table reader