[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-96432":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":18,"compositeScore":19,"rankGlobal":9,"rankLanguage":9,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":21,"hasPages":21,"topics":23,"createdAt":9,"pushedAt":9,"updatedAt":24,"readmeContent":25,"aiSummary":26,"trendingCount":15,"starSnapshotCount":15,"syncStatus":13,"lastSyncTime":27,"discoverSource":28},96432,"lead","planetscale\u002Flead","planetscale","A non-production Postgres text-search extension for exercising TIN-compatible application SQL in development, test, CI, and staging environments",null,"Rust",139,9,2,1,0,20,34,74,3,"GNU Affero General Public License v3.0",false,"main",[],"2026-09-21 02:04:32","# Lead\n\nLead is a deliberately non-production Postgres text-search extension for exercising TIN-compatible application SQL in development, test, CI, and staging environments.\n\nIt favors correctness and a small implementation over production query performance.\n\nIt is intentionally unsuitable for production workloads. Every index scan returns all heap pages as candidates; Postgres rechecks their visible rows for exact TINQL and MVCC behavior. The index stores no search data.\n\n## Build\n\n[Install `cargo-pgrx`](https:\u002F\u002Fgithub.com\u002Fpgcentralfoundation\u002Fpgrx\u002Fblob\u002Fdevelop\u002Fcargo-pgrx\u002FREADME.md) version 0.19.1 exactly and initialize it for the Postgres major versions you need, then build or package with one version feature:\n\n```sh\ncargo pgrx package --package tin --no-default-features --features pg18\n```\n\nFor an interactive development database, run:\n\n```sh\ncargo pgrx run pg18 --package tin\n```\n\nThen run `CREATE EXTENSION tin` in the database. Lead loads on demand and does not require `shared_preload_libraries` or `session_preload_libraries`.\n\n## Compatibility boundary\n\nLead provides the `tin` access method, the `==>` operator, TINQL parsing, tokenizer and index reloptions, and the scoring functions `tin.score`, `tin.full_score`, `tin.max_score`, and `tin.score_inspect`, plus explicit and implicitly bound `tin.highlight` and `tin.highlight_ansi`. Postgres 17 and 18 are build targets. Search results are exact because the access method returns whole-page candidates and Postgres evaluates `==>` against each visible heap tuple, including expression and partial-index rechecks.\n\nScoring deliberately rescans and retokenizes the visible indexed column or expression. A score call must be in the same query level as the matching `==>` predicate. Implicit highlighting has the same binding boundary; passing its `query` argument explicitly works without a bound predicate.\n\n## Execution and storage\n\nEach scan reads the table's current block count and adds every block to a lossy bitmap. Postgres owns row visibility, query rechecks, and table maintenance. Index builds evaluate indexed expressions and predicates for validation and statistics; inserts and VACUUM have no index entries to maintain.\n\nLead allocates no extension shared memory and creates no files outside Postgres's normal relation storage. Server restarts and crash recovery do not require rebuilding Lead indexes: scans use the recovered heap directly.\n\n\n## Tests\n\nRun the local unit and Postgres tests for a supported Postgres major version with:\n\n```sh\ncargo pgrx test pg18 --package tin --no-default-features --features pg18\n```\n\nDevelopers with access to the TIN private source may also run the more comprehensive test suite that comes with that:\n\n```sh\nTIN_PRIVATE_REPO=\u002Fpath\u002Fto\u002Ffull-tin script\u002Frun-private-regress pg18\n```\n\n## TINQL guide\n\nThe [TINQL guide](tinql\u002Fdocs\u002Fsrc\u002FSUMMARY.md) documents the query language. To build it with mdBook, run from the repository root:\n\n```sh\ncargo install mdbook --version 0.5.2 --locked\nmdbook build tinql\u002Fdocs\n```\n\nOpen `tinql\u002Fdocs\u002Fbook\u002Findex.html` in your browser to read the book.\n\n## Contributing\n\nWe intend for Lead to be a slow but correct substitute for TIN, for use at small scales in development and testing environments.  If you find cases where it's unsuitable for that, please contact PlanetScale through normal support channels or open an issue in this repo.  The most helpful bug reports will include information about what you expected Lead to do (which is normally whatever TIN would do in the same situation) versus what it actually did.  Help us recreate the problem so we can fix it.\n","Lead 是一个专为开发、测试、CI 和预发布环境设计的非生产级 PostgreSQL 全文检索扩展，用于验证与 TIN（Text Indexing and Navigation）兼容的应用 SQL 行为。其核心特点是严格遵循 PostgreSQL 的可见性规则（MVCC）和 TINQL 查询语义，通过返回全部堆页并由 Postgres 逐行重检查实现语义正确性；索引不存储实际搜索数据，不依赖共享内存或外部文件，重启后无需重建。它牺牲查询性能以换取行为可预测性和实现简洁性，适用于需要精确模拟生产 TIN 行为但无需高吞吐的验证场景。","2026-09-19 02:30:10","CREATED_QUERY"]