tin
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
lead | 1.0.6 | FTS | AGPL-3.0-or-later | Rust |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 2310 | tin | No | Yes | No | Yes | No | No | tin |
Untagged 1.0.6 source snapshot for development/CI, not production PlanetScale TIN. Conflicts with stannum in the same database.
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PIGSTY | 1.0.6 | 1817161514 | lead | - |
| RPM | PIGSTY | 1.0.6 | 1817161514 | lead_$v | - |
| DEB | PIGSTY | 1.0.6 | 1817161514 | postgresql-$v-lead | - |
| OS / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY 1.0.6 el8.x86_64.pg18 : lead_18 lead_18-1.0.6-1PGSTY.el8.x86_64.rpm
| PIGSTY 1.0.6 el8.x86_64.pg17 : lead_17 lead_17-1.0.6-1PGSTY.el8.x86_64.rpm
| N/A | N/A | N/A |
| el8.aarch64 | PIGSTY 1.0.6 el8.aarch64.pg18 : lead_18 lead_18-1.0.6-1PGSTY.el8.aarch64.rpm
| PIGSTY 1.0.6 el8.aarch64.pg17 : lead_17 lead_17-1.0.6-1PGSTY.el8.aarch64.rpm
| N/A | N/A | N/A |
| el9.x86_64 | PIGSTY 1.0.6 el9.x86_64.pg18 : lead_18 lead_18-1.0.6-1PGSTY.el9.x86_64.rpm
| PIGSTY 1.0.6 el9.x86_64.pg17 : lead_17 lead_17-1.0.6-1PGSTY.el9.x86_64.rpm
| N/A | N/A | N/A |
| el9.aarch64 | PIGSTY 1.0.6 el9.aarch64.pg18 : lead_18 lead_18-1.0.6-1PGSTY.el9.aarch64.rpm
| PIGSTY 1.0.6 el9.aarch64.pg17 : lead_17 lead_17-1.0.6-1PGSTY.el9.aarch64.rpm
| N/A | N/A | N/A |
| el10.x86_64 | PIGSTY 1.0.6 el10.x86_64.pg18 : lead_18 lead_18-1.0.6-1PGSTY.el10.x86_64.rpm
| PIGSTY 1.0.6 el10.x86_64.pg17 : lead_17 lead_17-1.0.6-1PGSTY.el10.x86_64.rpm
| N/A | N/A | N/A |
| el10.aarch64 | PIGSTY 1.0.6 el10.aarch64.pg18 : lead_18 lead_18-1.0.6-1PGSTY.el10.aarch64.rpm
| PIGSTY 1.0.6 el10.aarch64.pg17 : lead_17 lead_17-1.0.6-1PGSTY.el10.aarch64.rpm
| N/A | N/A | N/A |
| d12.x86_64 | PIGSTY 1.0.6 d12.x86_64.pg18 : postgresql-18-lead postgresql-18-lead_1.0.6-1PGSTY~bookworm_amd64.deb
| PIGSTY 1.0.6 d12.x86_64.pg17 : postgresql-17-lead postgresql-17-lead_1.0.6-1PGSTY~bookworm_amd64.deb
| N/A | N/A | N/A |
| d12.aarch64 | PIGSTY 1.0.6 d12.aarch64.pg18 : postgresql-18-lead postgresql-18-lead_1.0.6-1PGSTY~bookworm_arm64.deb
| PIGSTY 1.0.6 d12.aarch64.pg17 : postgresql-17-lead postgresql-17-lead_1.0.6-1PGSTY~bookworm_arm64.deb
| N/A | N/A | N/A |
| d13.x86_64 | PIGSTY 1.0.6 d13.x86_64.pg18 : postgresql-18-lead postgresql-18-lead_1.0.6-1PGSTY~trixie_amd64.deb
| PIGSTY 1.0.6 d13.x86_64.pg17 : postgresql-17-lead postgresql-17-lead_1.0.6-1PGSTY~trixie_amd64.deb
| N/A | N/A | N/A |
| d13.aarch64 | PIGSTY 1.0.6 d13.aarch64.pg18 : postgresql-18-lead postgresql-18-lead_1.0.6-1PGSTY~trixie_arm64.deb
| PIGSTY 1.0.6 d13.aarch64.pg17 : postgresql-17-lead postgresql-17-lead_1.0.6-1PGSTY~trixie_arm64.deb
| N/A | N/A | N/A |
| u22.x86_64 | PIGSTY 1.0.6 u22.x86_64.pg18 : postgresql-18-lead postgresql-18-lead_1.0.6-1PGSTY~jammy_amd64.deb
| PIGSTY 1.0.6 u22.x86_64.pg17 : postgresql-17-lead postgresql-17-lead_1.0.6-1PGSTY~jammy_amd64.deb
| N/A | N/A | N/A |
| u22.aarch64 | PIGSTY 1.0.6 u22.aarch64.pg18 : postgresql-18-lead postgresql-18-lead_1.0.6-1PGSTY~jammy_arm64.deb
| PIGSTY 1.0.6 u22.aarch64.pg17 : postgresql-17-lead postgresql-17-lead_1.0.6-1PGSTY~jammy_arm64.deb
| N/A | N/A | N/A |
| u24.x86_64 | PIGSTY 1.0.6 u24.x86_64.pg18 : postgresql-18-lead postgresql-18-lead_1.0.6-1PGSTY~noble_amd64.deb
| PIGSTY 1.0.6 u24.x86_64.pg17 : postgresql-17-lead postgresql-17-lead_1.0.6-1PGSTY~noble_amd64.deb
| N/A | N/A | N/A |
| u24.aarch64 | PIGSTY 1.0.6 u24.aarch64.pg18 : postgresql-18-lead postgresql-18-lead_1.0.6-1PGSTY~noble_arm64.deb
| PIGSTY 1.0.6 u24.aarch64.pg17 : postgresql-17-lead postgresql-17-lead_1.0.6-1PGSTY~noble_arm64.deb
| N/A | N/A | N/A |
| u26.x86_64 | PIGSTY 1.0.6 u26.x86_64.pg18 : postgresql-18-lead postgresql-18-lead_1.0.6-1PGSTY~resolute_amd64.deb
| PIGSTY 1.0.6 u26.x86_64.pg17 : postgresql-17-lead postgresql-17-lead_1.0.6-1PGSTY~resolute_amd64.deb
| N/A | N/A | N/A |
| u26.aarch64 | PIGSTY 1.0.6 u26.aarch64.pg18 : postgresql-18-lead postgresql-18-lead_1.0.6-1PGSTY~resolute_arm64.deb
| PIGSTY 1.0.6 u26.aarch64.pg17 : postgresql-17-lead postgresql-17-lead_1.0.6-1PGSTY~resolute_arm64.deb
| N/A | N/A | N/A |
Build
You can build the RPM / DEB packages for lead using pig build:
Install
You can install lead directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
Install the extension using pig or apt/yum/dnf:
Create Extension:
Usage
Sources:
tin is the extension name of Lead, a TIN-compatible text-search implementation for development, CI, and staging. The reviewed 1.0.6 source snapshot deliberately trades performance for a small reference implementation and is unsuitable for production search.
Core Workflow
Objects and Behavior
The tin access method and ==> operator evaluate TINQL predicates. tin.score, tin.full_score, tin.max_score, and tin.score_inspect expose scoring; tin.highlight and tin.highlight_ansi mark matches. Scoring calls bind to the matching search expression and index.
Every index scan returns all heap pages as lossy candidates. PostgreSQL rechecks the visible tuples, expressions, and partial-index predicates. The index stores no search data; scoring may rescan visible heap rows. This preserves query semantics without providing a production inverted index.
Requirements
The reviewed source targets PostgreSQL 17 and 18. Installation requires a superuser; objects use the fixed tin schema. The library loads on demand and needs no preload or restart. Keep realistic data volumes in mind when using it in tests.
PlanetScale documents TIN as its production search implementation and Lead as the local development substitute. Both use the canonical extension name tin; this catalog entry tracks the open-source Lead implementation. Its source-snapshot version is not a claim about the version deployed by PlanetScale.
The current source adds a trailing stemmer argument to tin.tokenize, tin.ql_parse, tin.highlight, and tin.highlight_ansi, while keeping the earlier signatures under names ending in _v1_0_3. Changing an index’s stemmer requires REINDEX. A score call must be at the same query level as its matching ==> predicate.
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)