biscuit

IAM-LIKE pattern matching with bitmap indexing

Overview

PackageVersionCategoryLicenseLanguage
pg_biscuit2.4.3FTSMITC
IDExtensionBinLibLoadCreateTrustRelocSchema
2170biscuitNoYesNoYesNoNopublic
Relatedplpgsql hll rum pg_textsearch

Latest stable PGXN distribution and package release is 2.4.3; 2.5.0 is testing; packaged control and SQL default version remain 2.4.1; package name is biscuit.

Version

TypeRepoVersionPG VerPackageDeps
EXTPIGSTY2.4.31817161514pg_biscuitplpgsql
RPMPIGSTY2.4.31817161514biscuit_$v-
DEBPIGSTY2.4.31817161514postgresql-$v-biscuit-
OS / PGPG18PG17PG16PG15PG14
el8.x86_64N/AN/A
el8.aarch64N/AN/A
el9.x86_64N/AN/A
el9.aarch64N/AN/A
el10.x86_64N/AN/A
el10.aarch64N/AN/A
d12.x86_64N/AN/A
d12.aarch64N/AN/A
d13.x86_64N/AN/A
d13.aarch64N/AN/A
u22.x86_64N/AN/A
u22.aarch64
PIGSTY 2.4.3
PIGSTY 2.4.3
PIGSTY 2.4.3
N/AN/A
u24.x86_64N/AN/A
u24.aarch64
PIGSTY 2.4.3
PIGSTY 2.4.3
PIGSTY 2.4.3
N/AN/A
u26.x86_64N/AN/A
u26.aarch64N/AN/A

Build

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

pig build pkg pg_biscuit         # build RPM / DEB packages

Install

You can install pg_biscuit 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:

pig install pg_biscuit;          # Install for current active PG version
pig ext install -y pg_biscuit -v 18  # PG 18
pig ext install -y pg_biscuit -v 17  # PG 17
pig ext install -y pg_biscuit -v 16  # PG 16
dnf install -y biscuit_18       # PG 18
dnf install -y biscuit_17       # PG 17
dnf install -y biscuit_16       # PG 16
apt install -y postgresql-18-biscuit   # PG 18
apt install -y postgresql-17-biscuit   # PG 17
apt install -y postgresql-16-biscuit   # PG 16

Create Extension:

CREATE EXTENSION biscuit CASCADE;  -- requires: plpgsql

Usage

Sources:

biscuit is an experimental PostgreSQL index access method optimized for pattern filters on text. It targets selective LIKE, ILIKE, NOT LIKE, and NOT ILIKE predicates, including multi-column and expression indexes, while trading additional memory and write work for faster filtering.

Core Workflow

CREATE EXTENSION biscuit;

CREATE INDEX message_body_biscuit_idx
ON message USING biscuit (body);

SELECT id, body
FROM message
WHERE body ILIKE '%timeout%';

Expression indexes work when the query uses the same expression:

CREATE INDEX customer_email_biscuit_idx
ON customer USING biscuit (lower(email));

SELECT *
FROM customer
WHERE lower(email) LIKE '%@example.com';

For predicates spanning several indexed text columns, use a multi-column index and confirm the chosen plan with EXPLAIN (ANALYZE, BUFFERS) on representative data.

Important Objects

  • biscuit is the index access method used in CREATE INDEX ... USING biscuit.
  • biscuit_operators reports the supported operators.
  • biscuit_version and biscuit_build_info expose build information; biscuit_build_info_json returns it as JSON.
  • biscuit_status reports the installed build and bitmap configuration.
  • biscuit_index_stats and biscuit_index_memory_size inspect an index and its memory footprint.
  • biscuit_memory_usage is a view of extension memory use.
  • biscuit_has_roaring and biscuit_roaring_version report optional Roaring bitmap support.

Limits and Operations

biscuit is for filtering, not ordered index scans. It does not provide regular-expression or similarity search. Indexes can be larger and more expensive to maintain than a B-tree; benchmark read selectivity, ingest cost, memory use, and vacuum behavior before production use. Keep a conventional index where ordering, equality, uniqueness, or another access method is still required.

The upstream project labels Biscuit as actively developed. PGXN publishes 2.4.3 as a stable distribution, but that archive’s changelog stops at 2.4.2, and its metadata and control file expose SQL extension version 2.4.1. Treat 2.4.3 as a distribution/package refresh: no additional SQL API delta is claimed. The material 2.4.2 change fixes a use-after-free in the index cache plus compiler warnings.


Last Modified 2026-07-23: update extension list to 555 (d81fc56)