biscuit
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
pg_biscuit | 2.4.1 | FTS | MIT | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 2170 | biscuit | No | Yes | No | Yes | No | No | public |
| Related | plpgsql hll rum pg_textsearch |
|---|
rename from pg_biscuit to biscuit to keep up with PGDG RPM name
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PIGSTY | 2.4.1 | 1817161514 | pg_biscuit | plpgsql |
| RPM | PIGSTY | 2.4.1 | 1817161514 | biscuit_$v | - |
| DEB | PIGSTY | 2.4.1 | 1817161514 | postgresql-$v-biscuit | - |
| OS / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY 2.4.1 | PIGSTY 2.4.1 | PIGSTY 2.4.1 | PIGSTY MISS | PIGSTY MISS |
| el8.aarch64 | PIGSTY 2.4.1 | PIGSTY 2.4.1 | PIGSTY 2.4.1 | PIGSTY MISS | PIGSTY MISS |
| el9.x86_64 | PIGSTY MISS | PIGSTY MISS | |||
| el9.aarch64 | PIGSTY MISS | PIGSTY MISS | |||
| el10.x86_64 | PIGSTY MISS | PIGSTY MISS | |||
| el10.aarch64 | PIGSTY MISS | PIGSTY MISS | |||
| d12.x86_64 | PIGSTY 2.4.0 d12.x86_64.pg18 : postgresql-18-biscuit postgresql-18-biscuit_2.4.0-1PIGSTY~bookworm_amd64.deb
| PIGSTY 2.4.0 d12.x86_64.pg17 : postgresql-17-biscuit postgresql-17-biscuit_2.4.0-1PIGSTY~bookworm_amd64.deb
| PIGSTY 2.4.0 d12.x86_64.pg16 : postgresql-16-biscuit postgresql-16-biscuit_2.4.0-1PIGSTY~bookworm_amd64.deb
| PIGSTY MISS | PIGSTY MISS |
| d12.aarch64 | PIGSTY 2.4.0 d12.aarch64.pg18 : postgresql-18-biscuit postgresql-18-biscuit_2.4.0-1PIGSTY~bookworm_arm64.deb
| PIGSTY 2.4.0 d12.aarch64.pg17 : postgresql-17-biscuit postgresql-17-biscuit_2.4.0-1PIGSTY~bookworm_arm64.deb
| PIGSTY 2.4.0 d12.aarch64.pg16 : postgresql-16-biscuit postgresql-16-biscuit_2.4.0-1PIGSTY~bookworm_arm64.deb
| PIGSTY MISS | PIGSTY MISS |
| d13.x86_64 | PIGSTY 2.4.0 d13.x86_64.pg18 : postgresql-18-biscuit postgresql-18-biscuit_2.4.0-1PIGSTY~trixie_amd64.deb
| PIGSTY 2.4.0 d13.x86_64.pg17 : postgresql-17-biscuit postgresql-17-biscuit_2.4.0-1PIGSTY~trixie_amd64.deb
| PIGSTY 2.4.0 d13.x86_64.pg16 : postgresql-16-biscuit postgresql-16-biscuit_2.4.0-1PIGSTY~trixie_amd64.deb
| PIGSTY MISS | PIGSTY MISS |
| d13.aarch64 | PIGSTY 2.4.0 d13.aarch64.pg18 : postgresql-18-biscuit postgresql-18-biscuit_2.4.0-1PIGSTY~trixie_arm64.deb
| PIGSTY 2.4.0 d13.aarch64.pg17 : postgresql-17-biscuit postgresql-17-biscuit_2.4.0-1PIGSTY~trixie_arm64.deb
| PIGSTY 2.4.0 d13.aarch64.pg16 : postgresql-16-biscuit postgresql-16-biscuit_2.4.0-1PIGSTY~trixie_arm64.deb
| PIGSTY MISS | PIGSTY MISS |
| u22.x86_64 | PIGSTY 2.4.0 u22.x86_64.pg18 : postgresql-18-biscuit postgresql-18-biscuit_2.4.0-1PIGSTY~jammy_amd64.deb
| PIGSTY 2.4.0 u22.x86_64.pg17 : postgresql-17-biscuit postgresql-17-biscuit_2.4.0-1PIGSTY~jammy_amd64.deb
| PIGSTY 2.4.0 u22.x86_64.pg16 : postgresql-16-biscuit postgresql-16-biscuit_2.4.0-1PIGSTY~jammy_amd64.deb
| PIGSTY MISS | PIGSTY MISS |
| u22.aarch64 | PIGSTY 2.4.0 u22.aarch64.pg18 : postgresql-18-biscuit postgresql-18-biscuit_2.4.0-1PIGSTY~jammy_arm64.deb
| PIGSTY 2.4.0 u22.aarch64.pg17 : postgresql-17-biscuit postgresql-17-biscuit_2.4.0-1PIGSTY~jammy_arm64.deb
| PIGSTY 2.4.0 u22.aarch64.pg16 : postgresql-16-biscuit postgresql-16-biscuit_2.4.0-1PIGSTY~jammy_arm64.deb
| PIGSTY MISS | PIGSTY MISS |
| u24.x86_64 | PIGSTY 2.4.0 u24.x86_64.pg18 : postgresql-18-biscuit postgresql-18-biscuit_2.4.0-1PIGSTY~noble_amd64.deb
| PIGSTY 2.4.0 u24.x86_64.pg17 : postgresql-17-biscuit postgresql-17-biscuit_2.4.0-1PIGSTY~noble_amd64.deb
| PIGSTY 2.4.0 u24.x86_64.pg16 : postgresql-16-biscuit postgresql-16-biscuit_2.4.0-1PIGSTY~noble_amd64.deb
| PIGSTY MISS | PIGSTY MISS |
| u24.aarch64 | PIGSTY 2.4.0 u24.aarch64.pg18 : postgresql-18-biscuit postgresql-18-biscuit_2.4.0-1PIGSTY~noble_arm64.deb
| PIGSTY 2.4.0 u24.aarch64.pg17 : postgresql-17-biscuit postgresql-17-biscuit_2.4.0-1PIGSTY~noble_arm64.deb
| PIGSTY 2.4.0 u24.aarch64.pg16 : postgresql-16-biscuit postgresql-16-biscuit_2.4.0-1PIGSTY~noble_arm64.deb
| PIGSTY MISS | PIGSTY MISS |
| u26.x86_64 | PIGSTY 2.4.0 u26.x86_64.pg18 : postgresql-18-biscuit postgresql-18-biscuit_2.4.0-1PIGSTY~resolute_amd64.deb
| PIGSTY 2.4.0 u26.x86_64.pg17 : postgresql-17-biscuit postgresql-17-biscuit_2.4.0-1PIGSTY~resolute_amd64.deb
| PIGSTY 2.4.0 u26.x86_64.pg16 : postgresql-16-biscuit postgresql-16-biscuit_2.4.0-1PIGSTY~resolute_amd64.deb
| PIGSTY MISS | PIGSTY MISS |
| u26.aarch64 | PIGSTY 2.4.0 u26.aarch64.pg18 : postgresql-18-biscuit postgresql-18-biscuit_2.4.0-1PIGSTY~resolute_arm64.deb
| PIGSTY 2.4.0 u26.aarch64.pg17 : postgresql-17-biscuit postgresql-17-biscuit_2.4.0-1PIGSTY~resolute_arm64.deb
| PIGSTY 2.4.0 u26.aarch64.pg16 : postgresql-16-biscuit postgresql-16-biscuit_2.4.0-1PIGSTY~resolute_arm64.deb
| PIGSTY MISS | PIGSTY MISS |
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 a PostgreSQL index access method for accelerating LIKE, NOT LIKE, ILIKE, and NOT ILIKE pattern matching on text. It uses bitmap-style position indexes to avoid the heap recheck overhead common in trigram searches and supports multi-column indexes for wildcard-heavy workloads.
PGXN package 2.4.1 ships the SQL/control version 2.4.0; the extension’s visible default_version is therefore still 2.4.0. The local Pigsty extension name is biscuit, while older package metadata may mention pg_biscuit.
Upstream marks Biscuit as actively developed and recommends thorough staging validation before production use. Test representative datasets, query patterns, upgrades, backup/restore, and performance behavior before relying on it for critical workloads.
Quick Start
CREATE EXTENSION IF NOT EXISTS biscuit;
CREATE TABLE users (
id bigserial PRIMARY KEY,
name text,
email text,
bio text
);
CREATE INDEX users_name_biscuit
ON users USING biscuit (name);
SELECT *
FROM users
WHERE name LIKE '%john%';
biscuit supports ordinary wildcard patterns with % and _:
SELECT * FROM users WHERE name LIKE 'john%';
SELECT * FROM users WHERE name LIKE '%smith';
SELECT * FROM users WHERE name LIKE '%oh_';
SELECT * FROM users WHERE name ILIKE '%john%';
SELECT * FROM users WHERE name NOT LIKE '%test%';
Multi-Column Indexes
CREATE INDEX users_search_biscuit
ON users USING biscuit (name, email, bio);
SELECT *
FROM users
WHERE name ILIKE '%john%'
AND email LIKE '%example.com'
AND bio NOT LIKE '%inactive%';
Biscuit can combine bitmap matches from multiple indexed columns and may reorder predicates by estimated selectivity.
Expression Indexes
Version 2.4.0 adds expression-index support:
CREATE INDEX users_lower_name_biscuit
ON users USING biscuit (lower(name));
SELECT *
FROM users
WHERE lower(name) LIKE '%john%';
For char(n) / bpchar columns, upstream recommends expression indexes that cast to text, because native bpchar operator classes are not yet available:
CREATE INDEX legacy_code_biscuit
ON legacy_table USING biscuit ((code::text));
Introspection
SELECT *
FROM biscuit_operators;
SELECT *
FROM biscuit_version_history;
The biscuit_operators view lists the operators registered for the Biscuit access method. In 2.4.0, the view was fixed to remain correct if additional operator classes or families are added.
Operational Notes
Biscuit’s design is optimized for:
- prefix, suffix, substring, and mixed wildcard
LIKE/ILIKEpatterns - multi-column predicates where bitmap intersections can reduce candidate sets
- exact pattern matching without trigram false-positive rechecks
- workloads where text-pattern search dominates query latency
It is not a general full-text search engine and does not replace ranking, stemming, tokenization, or phrase search. Use PostgreSQL full text search, trigram indexes, or dedicated search extensions when those semantics are required.
Caveats
- Upstream requires PostgreSQL 16 or newer and standard build tools. Pigsty local metadata currently packages Biscuit for PostgreSQL 16-18.
- PGXN package version 2.4.1 carries SQL/control
default_version = '2.4.0'; this is expected for the current source package. - Biscuit only targets
LIKE/ILIKE-style wildcard matching. Regular expressions are not the supported search surface. - Non-text columns should be indexed through explicit text expressions when needed.
- Benchmark against
pg_trgmand your actual data distribution before replacing existing production indexes.
Feedback
Was this page helpful?
Thanks for the feedback! Please let us know how we can improve.
Sorry to hear that. Please let us know how we can improve.