这是本节的多页打印视图。
点击此处打印.
返回本页常规视图.
类目:FTS
全文检索扩展:ElasticSearch 替代 pg_search,BM25,中文分词,欧洲语言分词字典 hunspell,模糊检索,2-gram/3-gram 索引。
1 - pg_search
ParadeDB BM25算法全文检索插件,ES全文检索
扩展总览
PIGSTY 第三方扩展: pg_search
: ParadeDB BM25算法全文检索插件,ES全文检索
基本信息
元数据
- 默认版本: 0.15.8
- PG大版本:
17
,16
,15
,14
- 动态加载: 无需动态加载
- 需要DDL: 需要执行
CREATE EXTENSION
DDL
- 可重定位: 可以重定位安装至其他模式下
- 信任程度: 受信任,无需超级用户,带
CREATE
权限的用户可以直接创建
- 所需模式:
paradedb
- 所需扩展: 无
软件包
- RPM仓库:PIGSTY
- RPM包名:
pg_search_$v
- RPM版本:
0.15.4
- RPM依赖:无
- DEB仓库:PIGSTY
- DEB包名:
postgresql-$v-pg-search
- DEB版本:
0.15.4
- DEB依赖:无
最新版本
扩展安装
使用 pig
命令行工具安装 pg_search
扩展:
pig ext install pg_search
使用 Pigsty剧本 安装 pg_search 扩展:
./pgsql.yml -t pg_extension -e '{"pg_extensions": ["pg_search"]}' # -l <集群名>
从 YUM仓库 手工安装 pg_search
RPM 包:
dnf install pg_search_17;
dnf install pg_search_16;
dnf install pg_search_15;
dnf install pg_search_14;
从 APT仓库 手工安装 pg_search
DEB 包:
apt install postgresql-17-pg-search;
apt install postgresql-16-pg-search;
apt install postgresql-15-pg-search;
apt install postgresql-14-pg-search;
使用以下 SQL 命令在已经安装此扩展插件的 PG 集群上 启用 pg_search
扩展:
CREATE EXTENSION pg_search;
使用方法
https://docs.paradedb.com/documentation/getting-started/quickstart
CREATE EXTENSION pg_search;
ALTER SYSTEM SET paradedb.pg_search_telemetry TO 'off';
CALL paradedb.create_bm25_test_table(
schema_name => 'public',
table_name => 'mock_items'
);
SELECT description, rating, category FROM mock_items LIMIT 3;
CALL paradedb.create_bm25(
index_name => 'search_idx',
schema_name => 'public',
table_name => 'mock_items',
key_field => 'id',
text_fields => paradedb.field('description', tokenizer => paradedb.tokenizer('en_stem')) ||
paradedb.field('category'),
numeric_fields => paradedb.field('rating')
);
SELECT description, rating, category
FROM search_idx.search('(description:keyboard OR category:electronics) AND rating:>2',limit_rows => 5);
CALL paradedb.create_bm25(
index_name => 'ngrams_idx',
schema_name => 'public',
table_name => 'mock_items',
key_field => 'id',
text_fields => paradedb.field('description', tokenizer => paradedb.tokenizer('ngram', min_gram => 4, max_gram => 4, prefix_only => false)) ||
paradedb.field('category')
);
SELECT description, rating, category
FROM ngrams_idx.search('description:blue');
2 - pgroonga
使用Groonga,面向所有语言的高速全文检索平台
扩展总览
PIGSTY 第三方扩展: pgroonga
: 使用Groonga,面向所有语言的高速全文检索平台
基本信息
元数据
- 默认版本: 4.0.0
- PG大版本:
17
,16
,15
,14
,13
- 动态加载: 无需动态加载
- 需要DDL: 需要执行
CREATE EXTENSION
DDL
- 可重定位: 无法安装至任意模式下
- 信任程度: 受信任,无需超级用户,带
CREATE
权限的用户可以直接创建
- 所需模式: 无
- 所需扩展: 无
软件包
- RPM仓库:PIGSTY
- RPM包名:
pgroonga_$v*
- RPM版本:
4.0.0
- RPM依赖:
groonga-libs
- DEB仓库:PIGSTY
- DEB包名:
postgresql-$v-pgroonga
- DEB版本:
4.0.0
- DEB依赖:
libgroonga0
最新版本
扩展安装
使用 pig
命令行工具安装 pgroonga
扩展:
使用 Pigsty剧本 安装 pgroonga 扩展:
./pgsql.yml -t pg_extension -e '{"pg_extensions": ["pgroonga"]}' # -l <集群名>
从 YUM仓库 手工安装 pgroonga
RPM 包:
dnf install pgroonga_17*;
dnf install pgroonga_16*;
dnf install pgroonga_15*;
dnf install pgroonga_14*;
dnf install pgroonga_13*;
从 APT仓库 手工安装 pgroonga
DEB 包:
apt install postgresql-17-pgroonga;
apt install postgresql-16-pgroonga;
apt install postgresql-15-pgroonga;
apt install postgresql-14-pgroonga;
apt install postgresql-13-pgroonga;
使用以下 SQL 命令在已经安装此扩展插件的 PG 集群上 启用 pgroonga
扩展:
CREATE EXTENSION pgroonga;
使用方法
- https://pgroonga.github.io/
- News: It lists release information.
- Overview: It describes about PGroonga.
- Install: It describes how to install PGroonga.
- Upgrade: It describes how to upgrade PGroonga.
- Uninstall: It describes how to uninstall PGroonga.
- Tutorial: It describes how to use PGroonga step by step.
- FAQ: Frequently asked questions.
- How to: It describes about useful information for specific situations.
- Reference: It describes details for each features such as options, functions and operators.
- Troubleshooting: It describes how to fix troubles.
- Community: It introduces about PGroonga community.
- Users: It lists PGroonga users.
- Development: It describes how to develop PGroonga.
Here’s a quick tutorial about how to use PGroonga:
CREATE EXTENSION IF NOT EXISTS pgroonga;
CREATE TABLE memos
(
id integer,
content text
);
CREATE INDEX pgroonga_content_index ON memos USING pgroonga (content);
INSERT INTO memos VALUES (1, 'PostgreSQL is a relational database management system.');
INSERT INTO memos VALUES (2, 'Groonga is a fast full text search engine that supports all languages.');
INSERT INTO memos VALUES (3, 'PGroonga is a PostgreSQL extension that uses Groonga as index.');
INSERT INTO memos VALUES (4, 'There is groonga command.');
SET enable_seqscan = off;
-- now let's query pgroonga
SELECT * FROM memos WHERE content &@ 'engine';
-- id | content
-- ----+------------------------------------------------------------------------
-- 2 | Groonga is a fast full text search engine that supports all languages.
-- (1 row)
SELECT * FROM memos WHERE content &@~ 'PGroonga OR PostgreSQL';
-- id | content
-- ----+----------------------------------------------------------------
-- 3 | PGroonga is a PostgreSQL extension that uses Groonga as index.
-- 1 | PostgreSQL is a relational database management system.
-- (2 rows)
SELECT * FROM memos WHERE content LIKE '%engine%';
-- id | content
-- ----+------------------------------------------------------------------------
-- 2 | Groonga is a fast full text search engine that supports all languages.
-- (1 row)
3 - pgroonga_database
PGGroonga 数据库管理模块
扩展总览
PIGSTY 第三方扩展: pgroonga
: PGGroonga 数据库管理模块
基本信息
元数据
- 默认版本: 4.0.0
- PG大版本:
17
,16
,15
,14
,13
- 动态加载: 无需动态加载
- 需要DDL: 需要执行
CREATE EXTENSION
DDL
- 可重定位: 无法安装至任意模式下
- 信任程度: 受信任,无需超级用户,带
CREATE
权限的用户可以直接创建
- 所需模式: 无
- 所需扩展: 无
软件包
- RPM仓库:PIGSTY
- RPM包名:
pgroonga_$v*
- RPM版本:
4.0.0
- RPM依赖:
groonga-libs
- DEB仓库:PIGSTY
- DEB包名:
postgresql-$v-pgroonga
- DEB版本:
4.0.0
- DEB依赖:
libgroonga0
最新版本
扩展安装
使用 pig
命令行工具安装 pgroonga
扩展:
pig ext install pgroonga; # 扩展名称
pig ext install pgroonga_database; # 标准包名
使用 Pigsty剧本 安装 pgroonga 扩展:
./pgsql.yml -t pg_extension -e '{"pg_extensions": ["pgroonga"]}' # -l <集群名>
从 YUM仓库 手工安装 pgroonga
RPM 包:
dnf install pgroonga_17*;
dnf install pgroonga_16*;
dnf install pgroonga_15*;
dnf install pgroonga_14*;
dnf install pgroonga_13*;
从 APT仓库 手工安装 pgroonga
DEB 包:
apt install postgresql-17-pgroonga;
apt install postgresql-16-pgroonga;
apt install postgresql-15-pgroonga;
apt install postgresql-14-pgroonga;
apt install postgresql-13-pgroonga;
使用以下 SQL 命令在已经安装此扩展插件的 PG 集群上 启用 pgroonga_database
扩展:
CREATE EXTENSION pgroonga_database;
4 - pg_bigm
基于二字组的多语言全文检索扩展
扩展总览
MIXED 第三方扩展: pg_bigm
: 基于二字组的多语言全文检索扩展
基本信息
元数据
- 默认版本: 1.2
- PG大版本:
17
,16
,15
,14
,13
- 动态加载: 无需动态加载
- 需要DDL: 需要执行
CREATE EXTENSION
DDL
- 可重定位: 无法安装至任意模式下
- 信任程度: 未受信任,创建扩展需要超级用户权限
- 所需模式: 无
- 所需扩展: 无
软件包
- RPM仓库:PGDG
- RPM包名:
pg_bigm_$v*
- RPM版本:
1.2
- RPM依赖:无
- DEB仓库:PIGSTY
- DEB包名:
postgresql-$v-pg-bigm
- DEB版本:
1.2
- DEB依赖:无
最新版本
扩展安装
使用 pig
命令行工具安装 pg_bigm
扩展:
使用 Pigsty剧本 安装 pg_bigm 扩展:
./pgsql.yml -t pg_extension -e '{"pg_extensions": ["pg_bigm"]}' # -l <集群名>
从 YUM仓库 手工安装 pg_bigm
RPM 包:
dnf install pg_bigm_17*;
dnf install pg_bigm_16*;
dnf install pg_bigm_15*;
dnf install pg_bigm_14*;
dnf install pg_bigm_13*;
从 APT仓库 手工安装 pg_bigm
DEB 包:
apt install postgresql-17-pg-bigm;
apt install postgresql-16-pg-bigm;
apt install postgresql-15-pg-bigm;
apt install postgresql-14-pg-bigm;
apt install postgresql-13-pg-bigm;
使用以下 SQL 命令在已经安装此扩展插件的 PG 集群上 启用 pg_bigm
扩展:
CREATE EXTENSION pg_bigm;
5 - zhparser
中文分词,全文搜索解析器
扩展总览
PIGSTY 第三方扩展: zhparser
: 中文分词,全文搜索解析器
基本信息
元数据
- 默认版本: 2.3
- PG大版本:
17
,16
,15
,14
,13
- 动态加载: 无需动态加载
- 需要DDL: 需要执行
CREATE EXTENSION
DDL
- 可重定位: 无法安装至任意模式下
- 信任程度: 未受信任,创建扩展需要超级用户权限
- 所需模式: 无
- 所需扩展: 无
软件包
- RPM仓库:PIGSTY
- RPM包名:
zhparser_$v*
- RPM版本:
2.3
- RPM依赖:无
- DEB仓库:PIGSTY
- DEB包名:
postgresql-$v-zhparser
- DEB版本:
2.3
- DEB依赖:无
最新版本
扩展安装
使用 pig
命令行工具安装 zhparser
扩展:
使用 Pigsty剧本 安装 zhparser 扩展:
./pgsql.yml -t pg_extension -e '{"pg_extensions": ["zhparser"]}' # -l <集群名>
从 YUM仓库 手工安装 zhparser
RPM 包:
dnf install zhparser_17*;
dnf install zhparser_16*;
dnf install zhparser_15*;
dnf install zhparser_14*;
dnf install zhparser_13*;
从 APT仓库 手工安装 zhparser
DEB 包:
apt install postgresql-17-zhparser;
apt install postgresql-16-zhparser;
apt install postgresql-15-zhparser;
apt install postgresql-14-zhparser;
apt install postgresql-13-zhparser;
使用以下 SQL 命令在已经安装此扩展插件的 PG 集群上 启用 zhparser
扩展:
CREATE EXTENSION zhparser;
6 - pg_bestmatch
在数据库内生成BM25稀疏向量
扩展总览
PIGSTY 第三方扩展: pg_bestmatch
: 在数据库内生成BM25稀疏向量
基本信息
元数据
- 默认版本: 0.0.1
- PG大版本:
17
,16
,15
,14
,13
- 动态加载: 需要显式加载
- 需要DDL: 需要执行
CREATE EXTENSION
DDL
- 可重定位: 可以重定位安装至其他模式下
- 信任程度: 未受信任,创建扩展需要超级用户权限
- 所需模式:
bm_catalog
- 所需扩展: 无
软件包
- RPM仓库:PIGSTY
- RPM包名:
pg_bestmatch_$v
- RPM版本:
0.0.1
- RPM依赖:无
- DEB仓库:PIGSTY
- DEB包名:
postgresql-$v-pg-bestmatch
- DEB版本:
0.0.1
- DEB依赖:无
最新版本
扩展安装
使用 pig
命令行工具安装 pg_bestmatch
扩展:
pig ext install pg_bestmatch
使用 Pigsty剧本 安装 pg_bestmatch 扩展:
./pgsql.yml -t pg_extension -e '{"pg_extensions": ["pg_bestmatch"]}' # -l <集群名>
从 YUM仓库 手工安装 pg_bestmatch
RPM 包:
dnf install pg_bestmatch_17;
dnf install pg_bestmatch_16;
dnf install pg_bestmatch_15;
dnf install pg_bestmatch_14;
dnf install pg_bestmatch_13;
从 APT仓库 手工安装 pg_bestmatch
DEB 包:
apt install postgresql-17-pg-bestmatch;
apt install postgresql-16-pg-bestmatch;
apt install postgresql-15-pg-bestmatch;
apt install postgresql-14-pg-bestmatch;
apt install postgresql-13-pg-bestmatch;
扩展 pg_bestmatch
需要通过 shared_preload_libraries
进行 动态加载:
shared_preload_libraries = 'pg_bestmatch'; # 修改 PG 集群配置
使用以下 SQL 命令在已经安装此扩展插件的 PG 集群上 启用 pg_bestmatch
扩展:
CREATE EXTENSION pg_bestmatch;
使用方法
How does it work?
- Create an BM25 statistics based on your document set by
bm25_create(table_name, column_name, statistic_name);
. It will create a materilized view to record the stats.
- Generate document sparse vector by
bm25_document_to_svector(statistic_name, passage)
- For query, generate query sparse vector
bm25_query_to_svector(statistic_name, query)
- Calculate the score by dot product between the query sparse vector and the document sparse vector
- Currently we use huggingface tokenizer with
bert-base-uncased
vocabulary set to tokenize words. Might support more configuration on tokenizer in the future.
Install
CREATE EXTENSION pg_bestmatch;
SET search_path TO public, bm_catalog;
Example
Here is an example workflow demonstrating the usage of this extension with the example of Stanford LoCo benchmark.
- Load the dataset. Here is a script for you if you want to experience
pg_bestmatch
with the dataset.
wget https://huggingface.co/api/datasets/hazyresearch/LoCoV1-Documents/parquet/default/test/0.parquet -O documents.parquet
wget https://huggingface.co/api/datasets/hazyresearch/LoCoV1-Queries/parquet/default/test/0.parquet -O queries.parquet
import pandas as pd
from sqlalchemy import create_engine
import numpy as np
from psycopg2.extensions import register_adapter, AsIs
def adapter_numpy_float64(numpy_float64):
return AsIs(numpy_float64)
def adapter_numpy_int64(numpy_int64):
return AsIs(numpy_int64)
def adapter_numpy_float32(numpy_float32):
return AsIs(numpy_float32)
def adapter_numpy_int32(numpy_int32):
return AsIs(numpy_int32)
def adapter_numpy_array(numpy_array):
return AsIs(tuple(numpy_array))
register_adapter(np.float64, adapter_numpy_float64)
register_adapter(np.int64, adapter_numpy_int64)
register_adapter(np.float32, adapter_numpy_float32)
register_adapter(np.int32, adapter_numpy_int32)
register_adapter(np.ndarray, adapter_numpy_array)
db_url = "postgresql://localhost:5432/pg_bestmatch_test"
engine = create_engine(db_url)
def load_documents():
df = pd.read_parquet("documents.parquet")
df.to_sql("documents", engine, if_exists='replace', index=False)
def load_queries():
df = pd.read_parquet("queries.parquet")
df['answer_pids'] = df['answer_pids'].apply(lambda x: str(x[0]))
df.to_sql("queries", engine, if_exists='replace', index=False)
load_documents()
load_queries()
- Create BM25 statistics for the
documents
table.
SELECT bm25_create('documents', 'passage', 'documents_passage_bm25', 0.75, 1.2);
- Add an embedding column to the
documents
and queries
tables and update the embeddings for documents and queries.
ALTER TABLE documents ADD COLUMN embedding svector; -- for pgvecto.rs users
ALTER TABLE documents ADD COLUMN embedding sparsevec; -- for pgvector users
UPDATE documents SET embedding = bm25_document_to_svector('documents_passage_bm25', passage)::svector; -- for pgvecto.rs users
UPDATE documents SET embedding = bm25_document_to_svector('documents_passage_bm25', passage, 'pgvector')::sparsevec; -- for pgvector users
- (Optional) Create a vector index on the sparse vector column.
CREATE INDEX ON documents USING vectors (embedding svector_dot_ops); -- for pgvecto.rs users
CREATE INDEX ON documents USING ivfflat (embedding sparsevec_ip_ops); -- for pgvector users
- Perform a vector search to find the most relevant documents for each query.
ALTER TABLE queries ADD COLUMN embedding svector; -- for pgvecto.rs users
ALTER TABLE queries ADD COLUMN embedding sparsevec; -- for pgvector users
UPDATE queries SET embedding = bm25_query_to_svector('documents_passage_bm25', query)::svector; -- for pgvecto.rs users
UPDATE queries SET embedding = bm25_query_to_svector('documents_passage_bm25', query, 'pgvector')::sparsevec; -- for pgvector users
SELECT sum((array[answer_pids] = array(SELECT pid FROM documents WHERE queries.dataset = documents.dataset ORDER BY queries.embedding <#> documents.embedding LIMIT 1))::int) FROM queries;
This workflow showcases how to leverage BM25 text queries and vector search in PostgreSQL using this extension. The Top 1 recall of BM25 on this dataset is 0.77
. If you reproduce the result, your operations are correct.
Comparison with pg_search
pg_bestmatch.rs
only provides methods for generating sparse vectors and does not support index-based search (which can be achieved by pgvecto.rs or pgvector).
pg_search
performs BM25 retrieval via the external tantivy
engine, which may have limitations when combined with transactions, filters, or JOIN operations. Since pg_bestmatch.rs
is entirely native to Postgres, it offers full compatibility with these operations inside postgres.
Reference
tokenize
- Description: Tokenizes an input string into individual tokens.
- Example:
SELECT tokenize('i have an apple'); -- result: {i,have,an,apple}
bm25_create
- Description: Creates BM25 statistics for a specified table and column.
- Usage:
SELECT bm25_create('documents', 'passage', 'documents_passage_bm25');
- Parameters:
table_name
: Name of the table.
column_name
: Name of the column.
stat_name
: Name of the BM25 statistics.
b
: BM25 parameter (default 0.75).
k
: BM25 parameter (default 1.2).
bm25_refresh
- Description: Updates the BM25 statistics to reflect any changes in the underlying data.
- Usage:
SELECT bm25_refresh('documents_passage_bm25');
- Parameters:
stat_name
: Name of the BM25 statistics to update.
bm25_drop
- Description: Deletes the BM25 statistics for a specified table and column.
- Usage:
SELECT bm25_drop('documents_passage_bm25');
- Parameters:
stat_name
: Name of the BM25 statistics to delete.
bm25_document_to_svector
- Description: Converts document text into a sparse vector representation.
- Usage:
SELECT bm25_document_to_svector('documents_passage_bm25', 'document_text');
- Parameters:
stat_name
: Name of the BM25 statistics.
document_text
: The text of the document.
style
: Emits pgvecto.rs
-style sparse vector or pgvector
-style sparse vector.
bm25_query_to_svector
- Description: Converts query text into a sparse vector representation.
- Usage:
SELECT bm25_query_to_svector('documents_passage_bm25', 'We begin, as always, with the text.');
- Parameters:
stat_name
: Name of the BM25 statistics.
query_text
: The text of the query.
style
: Emits pgvecto.rs
-style sparse vector or pgvector
-style sparse vector.
7 - vchord_bm25
BM25排序算法
扩展总览
PIGSTY 第三方扩展: vchord_bm25
: BM25排序算法
基本信息
元数据
- 默认版本: 0.1.1
- PG大版本:
17
,16
,15
,14
- 动态加载: 需要显式加载
- 需要DDL: 需要执行
CREATE EXTENSION
DDL
- 可重定位: 可以重定位安装至其他模式下
- 信任程度: 未受信任,创建扩展需要超级用户权限
- 所需模式:
bm25_catalog
- 所需扩展: 无
软件包
- RPM仓库:PIGSTY
- RPM包名:
vchord_bm25_$v
- RPM版本:
0.1.1
- RPM依赖:无
- DEB仓库:PIGSTY
- DEB包名:
postgresql-$v-vchord-bm25
- DEB版本:
0.1.1
- DEB依赖:无
最新版本
扩展安装
使用 pig
命令行工具安装 vchord_bm25
扩展:
pig ext install vchord_bm25
使用 Pigsty剧本 安装 vchord_bm25 扩展:
./pgsql.yml -t pg_extension -e '{"pg_extensions": ["vchord_bm25"]}' # -l <集群名>
从 YUM仓库 手工安装 vchord_bm25
RPM 包:
dnf install vchord_bm25_17;
dnf install vchord_bm25_16;
dnf install vchord_bm25_15;
dnf install vchord_bm25_14;
从 APT仓库 手工安装 vchord_bm25
DEB 包:
apt install postgresql-17-vchord-bm25;
apt install postgresql-16-vchord-bm25;
apt install postgresql-15-vchord-bm25;
apt install postgresql-14-vchord-bm25;
扩展 vchord_bm25
需要通过 shared_preload_libraries
进行 动态加载:
shared_preload_libraries = 'vchord_bm25'; # 修改 PG 集群配置
使用以下 SQL 命令在已经安装此扩展插件的 PG 集群上 启用 vchord_bm25
扩展:
CREATE EXTENSION vchord_bm25;
8 - hunspell_cs_cz
Hunspell捷克语全文检索词典
扩展总览
PIGSTY 第三方扩展: hunspell_cs_cz
: Hunspell捷克语全文检索词典
基本信息
元数据
- 默认版本: 1.0
- PG大版本:
17
,16
,15
,14
,13
- 动态加载: 无需动态加载
- 需要DDL: 需要执行
CREATE EXTENSION
DDL
- 可重定位: 无法安装至任意模式下
- 信任程度: 未受信任,创建扩展需要超级用户权限
- 所需模式: 无
- 所需扩展: 无
软件包
- RPM仓库:PIGSTY
- RPM包名:
hunspell_cs_cz_$v
- RPM版本:
1.0
- RPM依赖:无
- DEB仓库:PIGSTY
- DEB包名:
postgresql-$v-hunspell-cs-cz
- DEB版本:
1.0
- DEB依赖:无
最新版本
扩展安装
使用 pig
命令行工具安装 hunspell_cs_cz
扩展:
pig ext install hunspell_cs_cz
使用 Pigsty剧本 安装 hunspell_cs_cz 扩展:
./pgsql.yml -t pg_extension -e '{"pg_extensions": ["hunspell_cs_cz"]}' # -l <集群名>
从 YUM仓库 手工安装 hunspell_cs_cz
RPM 包:
dnf install hunspell_cs_cz_17;
dnf install hunspell_cs_cz_16;
dnf install hunspell_cs_cz_15;
dnf install hunspell_cs_cz_14;
dnf install hunspell_cs_cz_13;
从 APT仓库 手工安装 hunspell_cs_cz
DEB 包:
apt install postgresql-17-hunspell-cs-cz;
apt install postgresql-16-hunspell-cs-cz;
apt install postgresql-15-hunspell-cs-cz;
apt install postgresql-14-hunspell-cs-cz;
apt install postgresql-13-hunspell-cs-cz;
使用以下 SQL 命令在已经安装此扩展插件的 PG 集群上 启用 hunspell_cs_cz
扩展:
CREATE EXTENSION hunspell_cs_cz;
9 - hunspell_de_de
Hunspell德语全文检索词典
扩展总览
PIGSTY 第三方扩展: hunspell_de_de
: Hunspell德语全文检索词典
基本信息
元数据
- 默认版本: 1.0
- PG大版本:
17
,16
,15
,14
,13
- 动态加载: 无需动态加载
- 需要DDL: 需要执行
CREATE EXTENSION
DDL
- 可重定位: 无法安装至任意模式下
- 信任程度: 未受信任,创建扩展需要超级用户权限
- 所需模式: 无
- 所需扩展: 无
软件包
- RPM仓库:PIGSTY
- RPM包名:
hunspell_de_de_$v
- RPM版本:
1.0
- RPM依赖:无
- DEB仓库:PIGSTY
- DEB包名:
postgresql-$v-hunspell-de-de
- DEB版本:
1.0
- DEB依赖:无
最新版本
扩展安装
使用 pig
命令行工具安装 hunspell_de_de
扩展:
pig ext install hunspell_de_de
使用 Pigsty剧本 安装 hunspell_de_de 扩展:
./pgsql.yml -t pg_extension -e '{"pg_extensions": ["hunspell_de_de"]}' # -l <集群名>
从 YUM仓库 手工安装 hunspell_de_de
RPM 包:
dnf install hunspell_de_de_17;
dnf install hunspell_de_de_16;
dnf install hunspell_de_de_15;
dnf install hunspell_de_de_14;
dnf install hunspell_de_de_13;
从 APT仓库 手工安装 hunspell_de_de
DEB 包:
apt install postgresql-17-hunspell-de-de;
apt install postgresql-16-hunspell-de-de;
apt install postgresql-15-hunspell-de-de;
apt install postgresql-14-hunspell-de-de;
apt install postgresql-13-hunspell-de-de;
使用以下 SQL 命令在已经安装此扩展插件的 PG 集群上 启用 hunspell_de_de
扩展:
CREATE EXTENSION hunspell_de_de;
10 - hunspell_en_us
Hunspell英语全文检索词典
扩展总览
PIGSTY 第三方扩展: hunspell_en_us
: Hunspell英语全文检索词典
基本信息
元数据
- 默认版本: 1.0
- PG大版本:
17
,16
,15
,14
,13
- 动态加载: 无需动态加载
- 需要DDL: 需要执行
CREATE EXTENSION
DDL
- 可重定位: 无法安装至任意模式下
- 信任程度: 未受信任,创建扩展需要超级用户权限
- 所需模式: 无
- 所需扩展: 无
软件包
- RPM仓库:PIGSTY
- RPM包名:
hunspell_en_us_$v
- RPM版本:
1.0
- RPM依赖:无
- DEB仓库:PIGSTY
- DEB包名:
postgresql-$v-hunspell-en-us
- DEB版本:
1.0
- DEB依赖:无
最新版本
扩展安装
使用 pig
命令行工具安装 hunspell_en_us
扩展:
pig ext install hunspell_en_us
使用 Pigsty剧本 安装 hunspell_en_us 扩展:
./pgsql.yml -t pg_extension -e '{"pg_extensions": ["hunspell_en_us"]}' # -l <集群名>
从 YUM仓库 手工安装 hunspell_en_us
RPM 包:
dnf install hunspell_en_us_17;
dnf install hunspell_en_us_16;
dnf install hunspell_en_us_15;
dnf install hunspell_en_us_14;
dnf install hunspell_en_us_13;
从 APT仓库 手工安装 hunspell_en_us
DEB 包:
apt install postgresql-17-hunspell-en-us;
apt install postgresql-16-hunspell-en-us;
apt install postgresql-15-hunspell-en-us;
apt install postgresql-14-hunspell-en-us;
apt install postgresql-13-hunspell-en-us;
使用以下 SQL 命令在已经安装此扩展插件的 PG 集群上 启用 hunspell_en_us
扩展:
CREATE EXTENSION hunspell_en_us;
11 - hunspell_fr
Hunspell法语全文检索词典
扩展总览
PIGSTY 第三方扩展: hunspell_fr
: Hunspell法语全文检索词典
基本信息
元数据
- 默认版本: 1.0
- PG大版本:
17
,16
,15
,14
,13
- 动态加载: 无需动态加载
- 需要DDL: 需要执行
CREATE EXTENSION
DDL
- 可重定位: 无法安装至任意模式下
- 信任程度: 未受信任,创建扩展需要超级用户权限
- 所需模式: 无
- 所需扩展: 无
软件包
- RPM仓库:PIGSTY
- RPM包名:
hunspell_fr_$v
- RPM版本:
1.0
- RPM依赖:无
- DEB仓库:PIGSTY
- DEB包名:
postgresql-$v-hunspell-fr
- DEB版本:
1.0
- DEB依赖:无
最新版本
扩展安装
使用 pig
命令行工具安装 hunspell_fr
扩展:
pig ext install hunspell_fr
使用 Pigsty剧本 安装 hunspell_fr 扩展:
./pgsql.yml -t pg_extension -e '{"pg_extensions": ["hunspell_fr"]}' # -l <集群名>
从 YUM仓库 手工安装 hunspell_fr
RPM 包:
dnf install hunspell_fr_17;
dnf install hunspell_fr_16;
dnf install hunspell_fr_15;
dnf install hunspell_fr_14;
dnf install hunspell_fr_13;
从 APT仓库 手工安装 hunspell_fr
DEB 包:
apt install postgresql-17-hunspell-fr;
apt install postgresql-16-hunspell-fr;
apt install postgresql-15-hunspell-fr;
apt install postgresql-14-hunspell-fr;
apt install postgresql-13-hunspell-fr;
使用以下 SQL 命令在已经安装此扩展插件的 PG 集群上 启用 hunspell_fr
扩展:
CREATE EXTENSION hunspell_fr;
12 - hunspell_ne_np
Hunspell尼泊尔语全文检索词典
扩展总览
PIGSTY 第三方扩展: hunspell_ne_np
: Hunspell尼泊尔语全文检索词典
基本信息
元数据
- 默认版本: 1.0
- PG大版本:
17
,16
,15
,14
,13
- 动态加载: 无需动态加载
- 需要DDL: 需要执行
CREATE EXTENSION
DDL
- 可重定位: 无法安装至任意模式下
- 信任程度: 未受信任,创建扩展需要超级用户权限
- 所需模式: 无
- 所需扩展: 无
软件包
- RPM仓库:PIGSTY
- RPM包名:
hunspell_ne_np_$v
- RPM版本:
1.0
- RPM依赖:无
- DEB仓库:PIGSTY
- DEB包名:
postgresql-$v-hunspell-ne-np
- DEB版本:
1.0
- DEB依赖:无
最新版本
扩展安装
使用 pig
命令行工具安装 hunspell_ne_np
扩展:
pig ext install hunspell_ne_np
使用 Pigsty剧本 安装 hunspell_ne_np 扩展:
./pgsql.yml -t pg_extension -e '{"pg_extensions": ["hunspell_ne_np"]}' # -l <集群名>
从 YUM仓库 手工安装 hunspell_ne_np
RPM 包:
dnf install hunspell_ne_np_17;
dnf install hunspell_ne_np_16;
dnf install hunspell_ne_np_15;
dnf install hunspell_ne_np_14;
dnf install hunspell_ne_np_13;
从 APT仓库 手工安装 hunspell_ne_np
DEB 包:
apt install postgresql-17-hunspell-ne-np;
apt install postgresql-16-hunspell-ne-np;
apt install postgresql-15-hunspell-ne-np;
apt install postgresql-14-hunspell-ne-np;
apt install postgresql-13-hunspell-ne-np;
使用以下 SQL 命令在已经安装此扩展插件的 PG 集群上 启用 hunspell_ne_np
扩展:
CREATE EXTENSION hunspell_ne_np;
13 - hunspell_nl_nl
Hunspell荷兰语全文检索词典
扩展总览
PIGSTY 第三方扩展: hunspell_nl_nl
: Hunspell荷兰语全文检索词典
基本信息
元数据
- 默认版本: 1.0
- PG大版本:
17
,16
,15
,14
,13
- 动态加载: 无需动态加载
- 需要DDL: 需要执行
CREATE EXTENSION
DDL
- 可重定位: 无法安装至任意模式下
- 信任程度: 未受信任,创建扩展需要超级用户权限
- 所需模式: 无
- 所需扩展: 无
软件包
- RPM仓库:PIGSTY
- RPM包名:
hunspell_nl_nl_$v
- RPM版本:
1.0
- RPM依赖:无
- DEB仓库:PIGSTY
- DEB包名:
postgresql-$v-hunspell-nl-nl
- DEB版本:
1.0
- DEB依赖:无
最新版本
扩展安装
使用 pig
命令行工具安装 hunspell_nl_nl
扩展:
pig ext install hunspell_nl_nl
使用 Pigsty剧本 安装 hunspell_nl_nl 扩展:
./pgsql.yml -t pg_extension -e '{"pg_extensions": ["hunspell_nl_nl"]}' # -l <集群名>
从 YUM仓库 手工安装 hunspell_nl_nl
RPM 包:
dnf install hunspell_nl_nl_17;
dnf install hunspell_nl_nl_16;
dnf install hunspell_nl_nl_15;
dnf install hunspell_nl_nl_14;
dnf install hunspell_nl_nl_13;
从 APT仓库 手工安装 hunspell_nl_nl
DEB 包:
apt install postgresql-17-hunspell-nl-nl;
apt install postgresql-16-hunspell-nl-nl;
apt install postgresql-15-hunspell-nl-nl;
apt install postgresql-14-hunspell-nl-nl;
apt install postgresql-13-hunspell-nl-nl;
使用以下 SQL 命令在已经安装此扩展插件的 PG 集群上 启用 hunspell_nl_nl
扩展:
CREATE EXTENSION hunspell_nl_nl;
14 - hunspell_nn_no
Hunspell挪威语全文检索词典
扩展总览
PIGSTY 第三方扩展: hunspell_nn_no
: Hunspell挪威语全文检索词典
基本信息
元数据
- 默认版本: 1.0
- PG大版本:
17
,16
,15
,14
,13
- 动态加载: 无需动态加载
- 需要DDL: 需要执行
CREATE EXTENSION
DDL
- 可重定位: 无法安装至任意模式下
- 信任程度: 未受信任,创建扩展需要超级用户权限
- 所需模式: 无
- 所需扩展: 无
软件包
- RPM仓库:PIGSTY
- RPM包名:
hunspell_nn_no_$v
- RPM版本:
1.0
- RPM依赖:无
- DEB仓库:PIGSTY
- DEB包名:
postgresql-$v-hunspell-nn-no
- DEB版本:
1.0
- DEB依赖:无
最新版本
扩展安装
使用 pig
命令行工具安装 hunspell_nn_no
扩展:
pig ext install hunspell_nn_no
使用 Pigsty剧本 安装 hunspell_nn_no 扩展:
./pgsql.yml -t pg_extension -e '{"pg_extensions": ["hunspell_nn_no"]}' # -l <集群名>
从 YUM仓库 手工安装 hunspell_nn_no
RPM 包:
dnf install hunspell_nn_no_17;
dnf install hunspell_nn_no_16;
dnf install hunspell_nn_no_15;
dnf install hunspell_nn_no_14;
dnf install hunspell_nn_no_13;
从 APT仓库 手工安装 hunspell_nn_no
DEB 包:
apt install postgresql-17-hunspell-nn-no;
apt install postgresql-16-hunspell-nn-no;
apt install postgresql-15-hunspell-nn-no;
apt install postgresql-14-hunspell-nn-no;
apt install postgresql-13-hunspell-nn-no;
使用以下 SQL 命令在已经安装此扩展插件的 PG 集群上 启用 hunspell_nn_no
扩展:
CREATE EXTENSION hunspell_nn_no;
15 - hunspell_pt_pt
Hunspell葡萄牙语全文检索词典
扩展总览
PIGSTY 第三方扩展: hunspell_pt_pt
: Hunspell葡萄牙语全文检索词典
基本信息
元数据
- 默认版本: 1.0
- PG大版本:
17
,16
,15
,14
,13
- 动态加载: 无需动态加载
- 需要DDL: 需要执行
CREATE EXTENSION
DDL
- 可重定位: 无法安装至任意模式下
- 信任程度: 未受信任,创建扩展需要超级用户权限
- 所需模式: 无
- 所需扩展: 无
软件包
- RPM仓库:PIGSTY
- RPM包名:
hunspell_pt_pt_$v
- RPM版本:
1.0
- RPM依赖:无
- DEB仓库:PIGSTY
- DEB包名:
postgresql-$v-hunspell-pt-pt
- DEB版本:
1.0
- DEB依赖:无
最新版本
扩展安装
使用 pig
命令行工具安装 hunspell_pt_pt
扩展:
pig ext install hunspell_pt_pt
使用 Pigsty剧本 安装 hunspell_pt_pt 扩展:
./pgsql.yml -t pg_extension -e '{"pg_extensions": ["hunspell_pt_pt"]}' # -l <集群名>
从 YUM仓库 手工安装 hunspell_pt_pt
RPM 包:
dnf install hunspell_pt_pt_17;
dnf install hunspell_pt_pt_16;
dnf install hunspell_pt_pt_15;
dnf install hunspell_pt_pt_14;
dnf install hunspell_pt_pt_13;
从 APT仓库 手工安装 hunspell_pt_pt
DEB 包:
apt install postgresql-17-hunspell-pt-pt;
apt install postgresql-16-hunspell-pt-pt;
apt install postgresql-15-hunspell-pt-pt;
apt install postgresql-14-hunspell-pt-pt;
apt install postgresql-13-hunspell-pt-pt;
使用以下 SQL 命令在已经安装此扩展插件的 PG 集群上 启用 hunspell_pt_pt
扩展:
CREATE EXTENSION hunspell_pt_pt;
16 - hunspell_ru_ru
Hunspell俄语全文检索词典
扩展总览
PIGSTY 第三方扩展: hunspell_ru_ru
: Hunspell俄语全文检索词典
基本信息
元数据
- 默认版本: 1.0
- PG大版本:
17
,16
,15
,14
,13
- 动态加载: 无需动态加载
- 需要DDL: 需要执行
CREATE EXTENSION
DDL
- 可重定位: 无法安装至任意模式下
- 信任程度: 未受信任,创建扩展需要超级用户权限
- 所需模式: 无
- 所需扩展: 无
软件包
- RPM仓库:PIGSTY
- RPM包名:
hunspell_ru_ru_$v
- RPM版本:
1.0
- RPM依赖:无
- DEB仓库:PIGSTY
- DEB包名:
postgresql-$v-hunspell-ru-ru
- DEB版本:
1.0
- DEB依赖:无
最新版本
扩展安装
使用 pig
命令行工具安装 hunspell_ru_ru
扩展:
pig ext install hunspell_ru_ru
使用 Pigsty剧本 安装 hunspell_ru_ru 扩展:
./pgsql.yml -t pg_extension -e '{"pg_extensions": ["hunspell_ru_ru"]}' # -l <集群名>
从 YUM仓库 手工安装 hunspell_ru_ru
RPM 包:
dnf install hunspell_ru_ru_17;
dnf install hunspell_ru_ru_16;
dnf install hunspell_ru_ru_15;
dnf install hunspell_ru_ru_14;
dnf install hunspell_ru_ru_13;
从 APT仓库 手工安装 hunspell_ru_ru
DEB 包:
apt install postgresql-17-hunspell-ru-ru;
apt install postgresql-16-hunspell-ru-ru;
apt install postgresql-15-hunspell-ru-ru;
apt install postgresql-14-hunspell-ru-ru;
apt install postgresql-13-hunspell-ru-ru;
使用以下 SQL 命令在已经安装此扩展插件的 PG 集群上 启用 hunspell_ru_ru
扩展:
CREATE EXTENSION hunspell_ru_ru;
17 - hunspell_ru_ru_aot
Hunspell俄语全文检索词典(来自AOT.ru小组)
扩展总览
PIGSTY 第三方扩展: hunspell_ru_ru_aot
: Hunspell俄语全文检索词典(来自AOT.ru小组)
基本信息
元数据
- 默认版本: 1.0
- PG大版本:
17
,16
,15
,14
,13
- 动态加载: 无需动态加载
- 需要DDL: 需要执行
CREATE EXTENSION
DDL
- 可重定位: 无法安装至任意模式下
- 信任程度: 未受信任,创建扩展需要超级用户权限
- 所需模式: 无
- 所需扩展: 无
软件包
- RPM仓库:PIGSTY
- RPM包名:
hunspell_ru_ru_aot_$v
- RPM版本:
1.0
- RPM依赖:无
- DEB仓库:PIGSTY
- DEB包名:
postgresql-$v-hunspell-ru-ru-aot
- DEB版本:
1.0
- DEB依赖:无
最新版本
扩展安装
使用 pig
命令行工具安装 hunspell_ru_ru_aot
扩展:
pig ext install hunspell_ru_ru_aot
使用 Pigsty剧本 安装 hunspell_ru_ru_aot 扩展:
./pgsql.yml -t pg_extension -e '{"pg_extensions": ["hunspell_ru_ru_aot"]}' # -l <集群名>
从 YUM仓库 手工安装 hunspell_ru_ru_aot
RPM 包:
dnf install hunspell_ru_ru_aot_17;
dnf install hunspell_ru_ru_aot_16;
dnf install hunspell_ru_ru_aot_15;
dnf install hunspell_ru_ru_aot_14;
dnf install hunspell_ru_ru_aot_13;
从 APT仓库 手工安装 hunspell_ru_ru_aot
DEB 包:
apt install postgresql-17-hunspell-ru-ru-aot;
apt install postgresql-16-hunspell-ru-ru-aot;
apt install postgresql-15-hunspell-ru-ru-aot;
apt install postgresql-14-hunspell-ru-ru-aot;
apt install postgresql-13-hunspell-ru-ru-aot;
使用以下 SQL 命令在已经安装此扩展插件的 PG 集群上 启用 hunspell_ru_ru_aot
扩展:
CREATE EXTENSION hunspell_ru_ru_aot;
18 - fuzzystrmatch
确定字符串之间的相似性和距离
扩展总览
CONTRIB 自带扩展: fuzzystrmatch
: 确定字符串之间的相似性和距离
基本信息
元数据
- 默认版本: 1.2
- PG大版本:
17
,16
,15
,14
,13
- 动态加载: 无需动态加载
- 需要DDL: 需要执行
CREATE EXTENSION
DDL
- 可重定位: 未知
- 信任程度: 受信任,无需超级用户,带
CREATE
权限的用户可以直接创建
- 所需模式: 无
- 所需扩展: 无
软件包
PostgreSQL 自带 Contrib 扩展模块
最新版本
系统 |
架构 |
PG17 |
PG16 |
PG15 |
PG14 |
PG13 |
el8 |
x86_64 |
|
|
|
|
|
el8 |
aarch64 |
|
|
|
|
|
el9 |
x86_64 |
|
|
|
|
|
el9 |
aarch64 |
|
|
|
|
|
d12 |
x86_64 |
|
|
|
|
|
d12 |
aarch64 |
|
|
|
|
|
u22 |
x86_64 |
|
|
|
|
|
u22 |
aarch64 |
|
|
|
|
|
u24 |
x86_64 |
|
|
|
|
|
u24 |
aarch64 |
|
|
|
|
|
扩展安装
扩展 fuzzystrmatch
属于 PostgreSQL 自带的第一方 Contrib 扩展,无需独立安装。
从 YUM仓库 手工安装 fuzzystrmatch
RPM 包:
dnf install postgresql17-contrib;
dnf install postgresql16-contrib;
dnf install postgresql15-contrib;
dnf install postgresql14-contrib;
dnf install postgresql13-contrib;
从 APT仓库 手工安装 fuzzystrmatch
DEB 包:
apt install postgresql-17;
apt install postgresql-16;
apt install postgresql-15;
apt install postgresql-14;
apt install postgresql-13;
使用以下 SQL 命令在已经安装此扩展插件的 PG 集群上 启用 fuzzystrmatch
扩展:
CREATE EXTENSION fuzzystrmatch;
19 - pg_trgm
文本相似度测量函数与模糊检索
扩展总览
CONTRIB 自带扩展: pg_trgm
: 文本相似度测量函数与模糊检索
基本信息
元数据
- 默认版本: 1.6
- PG大版本:
17
,16
,15
,14
,13
- 动态加载: 无需动态加载
- 需要DDL: 需要执行
CREATE EXTENSION
DDL
- 可重定位: 未知
- 信任程度: 未受信任,创建扩展需要超级用户权限
- 所需模式: 无
- 所需扩展: 无
软件包
PostgreSQL 自带 Contrib 扩展模块
最新版本
系统 |
架构 |
PG17 |
PG16 |
PG15 |
PG14 |
PG13 |
el8 |
x86_64 |
|
|
|
|
|
el8 |
aarch64 |
|
|
|
|
|
el9 |
x86_64 |
|
|
|
|
|
el9 |
aarch64 |
|
|
|
|
|
d12 |
x86_64 |
|
|
|
|
|
d12 |
aarch64 |
|
|
|
|
|
u22 |
x86_64 |
|
|
|
|
|
u22 |
aarch64 |
|
|
|
|
|
u24 |
x86_64 |
|
|
|
|
|
u24 |
aarch64 |
|
|
|
|
|
扩展安装
扩展 pg_trgm
属于 PostgreSQL 自带的第一方 Contrib 扩展,无需独立安装。
从 YUM仓库 手工安装 pg_trgm
RPM 包:
dnf install postgresql17-contrib;
dnf install postgresql16-contrib;
dnf install postgresql15-contrib;
dnf install postgresql14-contrib;
dnf install postgresql13-contrib;
从 APT仓库 手工安装 pg_trgm
DEB 包:
apt install postgresql-17;
apt install postgresql-16;
apt install postgresql-15;
apt install postgresql-14;
apt install postgresql-13;
使用以下 SQL 命令在已经安装此扩展插件的 PG 集群上 启用 pg_trgm
扩展:
CREATE EXTENSION pg_trgm;