biscuit
pg_biscuit : IAM-LIKE pattern matching with bitmap indexing
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 2170 | biscuit
|
pg_biscuit
|
2.4.3 |
FTS
|
MIT
|
C
|
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
--s-d--
|
No
|
Yes
|
No
|
Yes
|
no
|
no
|
| Relationships | |
|---|---|
| Schemas | public |
| Requires | plpgsql
|
| See Also | 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.
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | PIGSTY
|
2.4.3 |
18
17
16
15
14
|
pg_biscuit |
plpgsql |
| RPM | PIGSTY
|
2.4.3 |
18
17
16
15
14
|
biscuit_$v |
- |
| DEB | PIGSTY
|
2.4.3 |
18
17
16
15
14
|
postgresql-$v-biscuit |
- |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
el8.x86_64
|
PIGSTY 2.4.3
|
PIGSTY 2.4.3
|
PIGSTY 2.4.3
|
N/A
|
N/A
|
el8.aarch64
|
PIGSTY 2.4.3
|
PIGSTY 2.4.3
|
PIGSTY 2.4.3
|
N/A
|
N/A
|
el9.x86_64
|
PIGSTY 2.4.3
|
PIGSTY 2.4.3
|
PIGSTY 2.4.3
|
N/A
|
N/A
|
el9.aarch64
|
PIGSTY 2.4.3
|
PIGSTY 2.4.3
|
PIGSTY 2.4.3
|
N/A
|
N/A
|
el10.x86_64
|
PIGSTY 2.4.3
|
PIGSTY 2.4.3
|
PIGSTY 2.4.3
|
N/A
|
N/A
|
el10.aarch64
|
PIGSTY 2.4.3
|
PIGSTY 2.4.3
|
PIGSTY 2.4.3
|
N/A
|
N/A
|
d12.x86_64
|
PIGSTY 2.4.3
|
PIGSTY 2.4.3
|
PIGSTY 2.4.3
|
N/A
|
N/A
|
d12.aarch64
|
PIGSTY 2.4.3
|
PIGSTY 2.4.3
|
PIGSTY 2.4.3
|
N/A
|
N/A
|
d13.x86_64
|
PIGSTY 2.4.3
|
PIGSTY 2.4.3
|
PIGSTY 2.4.3
|
N/A
|
N/A
|
d13.aarch64
|
PIGSTY 2.4.3
|
PIGSTY 2.4.3
|
PIGSTY 2.4.3
|
N/A
|
N/A
|
u22.x86_64
|
PIGSTY 2.4.3
|
PIGSTY 2.4.3
|
PIGSTY 2.4.3
|
N/A
|
N/A
|
u22.aarch64
|
PIGSTY 2.4.3
|
PIGSTY 2.4.3
|
PIGSTY 2.4.3
|
N/A
|
N/A
|
u24.x86_64
|
PIGSTY 2.4.3
|
PIGSTY 2.4.3
|
PIGSTY 2.4.3
|
N/A
|
N/A
|
u24.aarch64
|
PIGSTY 2.4.3
|
PIGSTY 2.4.3
|
PIGSTY 2.4.3
|
N/A
|
N/A
|
u26.x86_64
|
PIGSTY 2.4.3
|
PIGSTY 2.4.3
|
PIGSTY 2.4.3
|
N/A
|
N/A
|
u26.aarch64
|
PIGSTY 2.4.3
|
PIGSTY 2.4.3
|
PIGSTY 2.4.3
|
N/A
|
N/A
|
Source
pig build pkg pg_biscuit; # build rpm/debInstall
Make sure PGDG and PIGSTY repo available:
pig repo add pgsql -u # add both repo and update cacheInstall this extension with pig:
pig install pg_biscuit; # install via package name, for the active PG version
pig install biscuit; # install by extension name, for the current active PG version
pig install biscuit -v 18; # install for PG 18
pig install biscuit -v 17; # install for PG 17
pig install biscuit -v 16; # install for PG 16Create this extension with:
CREATE EXTENSION biscuit CASCADE; -- requires plpgsqlUsage
Sources:
- PGXN biscuit 2.4.3 distribution
- PGXN 2.4.3 metadata
- PGXN 2.4.3 control file
- PGXN 2.4.3 changelog
- Official documentation
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
biscuitis the index access method used inCREATE INDEX ... USING biscuit.biscuit_operatorsreports the supported operators.biscuit_versionandbiscuit_build_infoexpose build information;biscuit_build_info_jsonreturns it as JSON.biscuit_statusreports the installed build and bitmap configuration.biscuit_index_statsandbiscuit_index_memory_sizeinspect an index and its memory footprint.biscuit_memory_usageis a view of extension memory use.biscuit_has_roaringandbiscuit_roaring_versionreport 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.